Total Accepted: 44011 Total Submissions: 155436 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"]
Round 2 solution:
No comments:
Post a Comment