README ¶ 257. Binary Tree Paths 题目 Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] Explanation: All root-to-leaf paths are: 1->2->5, 1->3 题目大意 给定一个二叉树,返回所有从根节点到叶子节点的路径。说明: 叶子节点是指没有子节点的节点。 解题思路 Google 的面试题,考察递归 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type TreeNode Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type TreeNode ¶ type TreeNode = structures.TreeNode TreeNode define Source Files ¶ View all Source files 257. Binary Tree Paths.go Click to show internal directories. Click to hide internal directories.