Total Accepted: 36923
Total Submissions: 135278
Difficulty: 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"]
Java:
1 | /** |
select * from utils
Total Accepted: 36923
Total Submissions: 135278
Difficulty: 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"]
Java:
1 | /** |
欢迎加入我的小专栏「基你太美」一起学习。