摘要: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, 阅读全文
posted @ 2016-08-03 23:59 北叶青藤 阅读(343) 评论(0) 推荐(0)
摘要: Missing Ranges You are given an inclusive range [lower, upper] and a sorted unique integer array nums, where all elements are in the inclusive range. 阅读全文
posted @ 2016-08-03 08:27 北叶青藤 阅读(195) 评论(0) 推荐(0)
摘要: Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 阅读全文
posted @ 2016-08-03 07:19 北叶青藤 阅读(170) 评论(0) 推荐(0)
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For exa 阅读全文
posted @ 2016-08-03 04:48 北叶青藤 阅读(147) 评论(0) 推荐(0)
摘要: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to its ne 阅读全文
posted @ 2016-08-03 02:31 北叶青藤 阅读(289) 评论(0) 推荐(0)
摘要: Given a string, find the longest substring that contains only two unique characters. For example, given "abcbbbbcccbdddadacb", the longest substring t 阅读全文
posted @ 2016-08-03 01:05 北叶青藤 阅读(307) 评论(0) 推荐(0)