摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文
posted @ 2015-09-20 21:29 丶Blank 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th... 阅读全文
posted @ 2015-09-20 20:25 丶Blank 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For example, givenn... 阅读全文
posted @ 2015-09-20 17:09 丶Blank 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Given a positive integern, find the least number of perfect square numbers (for example,1, 4, 9, 16, ...) which sum ton.For example, givenn=12, return... 阅读全文
posted @ 2015-09-20 17:03 丶Blank 阅读(141) 评论(0) 推荐(0) 编辑
摘要: After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This t... 阅读全文
posted @ 2015-09-20 16:44 丶Blank 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to thedefinition of LCA on Wikipedia: “The lowest ... 阅读全文
posted @ 2015-09-20 16:39 丶Blank 阅读(200) 评论(0) 推荐(0) 编辑