Binary Tree Paths
Given a binary tree, return all root-to-leaf paths.
For example, given the following binary tree:
All root-to-leaf paths are:
分析
不用stringbuilder 因为正负号和数字长度未知。注意"->“的位置在最后。
Last updated
Given a binary tree, return all root-to-leaf paths.
For example, given the following binary tree:
All root-to-leaf paths are:
分析
不用stringbuilder 因为正负号和数字长度未知。注意"->“的位置在最后。
Last updated