摘要: 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"] 阅读全文
posted @ 2020-03-12 05:11 米开朗菠萝 阅读(95) 评论(0) 推荐(0)
摘要: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note:You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文
posted @ 2020-03-12 04:48 米开朗菠萝 阅读(82) 评论(0) 推荐(0)