难度:easy


Given a binary tree, return all root-to-leaf paths.

For example, given the following binary tree:

   1
 /   \
2     3
 \
  5

All root-to-leaf paths are:

["1->2->5", "1->3"]
思路:开始学习两叉树,仍然是以练带学,边练边学的方式。用递归的方法完成。


leetcode 257[easy]-----Binary Tree Paths

相关文章: