摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2016-07-13 20:51 Miller1991 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeat 阅读全文
posted @ 2016-07-13 20:30 Miller1991 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2016-07-13 16:41 Miller1991 阅读(197) 评论(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-07-13 16:17 Miller1991 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
posted @ 2016-07-13 14:08 Miller1991 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the f 阅读全文
posted @ 2016-07-13 11:34 Miller1991 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2016-07-13 11:01 Miller1991 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 基本字符 I V X L C D M 相应的阿拉伯数字表示为 1 5 10 50 1 阅读全文
posted @ 2016-07-13 10:29 Miller1991 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 基本字符 I V X L C D M 相应的阿拉伯数字表示为 1 5 10 50 1 阅读全文
posted @ 2016-07-13 10:16 Miller1991 阅读(153) 评论(0) 推荐(0) 编辑