new_contents: # Definition for a binary tree node.
  # class TreeNode(object):
  #     def __init__(self, x):
  #         self.val = x
  #         self.left = None
  #         self.right = None
  
  class Solution(object):
      def binaryTreePaths(self, root):
          """
          :type root: TreeNode
          :rtype: List[str]
          """
          if root is None:
              return []
          res = []
          def dfs(node, path):
              path.append(str(node.val))
              if node.left is None and node.right is None:
                  res.append('->'.join(path))
              if node.left:
                  dfs(node.left, path)
              if node.right:
                  dfs(node.right, path)
              path.pop()
  
          dfs(root, [])
          return res
  
subject: add solution for Binary Tree Paths