title: Not sure how this recursion works
body: <pre><code>class Solution: 
      def findDuplicateSubtrees(self, root):
          self.res = []
          self.dic = {}
          self.dfs(root)
          return self.res
  
      def dfs(self, root):
          if not root: return '#'
          tree = self.dfs(root.left) + self.dfs(root.right) + str(root.val)
  
          if tree in self.dic and self.dic[tree] == 1:
              self.res.append(root)
          self.dic[tree] = self.dic.get(tree, 0) + 1
  
          return tree
  </code></pre>
  
  <p>This is a solution for getting all duplicate subtrees given a binary tree.
  I am not sure what <code>tree = self.dfs(root.left) + self.dfs(root.right) + str(root.val)</code> is trying to give.</p>
  
  <p>I know it's trying to do a postorder traversal, but how does this part actually work?</p>
  
  <p>It would be great if anyone can follow through this code. Thanks.</p>