摘要:
Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. 阅读全文
posted @ 2016-04-21 14:52
ArgenBarbie
阅读(178)
评论(0)
推荐(0)
摘要:
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2016-04-21 13:11
ArgenBarbie
阅读(125)
评论(0)
推荐(0)
摘要:
Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in th 阅读全文
posted @ 2016-04-21 11:15
ArgenBarbie
阅读(170)
评论(0)
推荐(0)
摘要:
Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: If you notice carefully in the flatt 阅读全文
posted @ 2016-04-21 10:53
ArgenBarbie
阅读(173)
评论(0)
推荐(0)
摘要:
108. Convert Sorted Array to Binary Search Tree Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 109. 阅读全文
posted @ 2016-04-21 10:14
ArgenBarbie
阅读(171)
评论(0)
推荐(0)