上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 48 下一页
摘要: 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 @ 2017-10-24 21:53 daniel456 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The l 阅读全文
posted @ 2017-10-24 21:43 daniel456 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai < ak < aj. Design an algorithm th 阅读全文
posted @ 2017-10-24 21:35 daniel456 阅读(200) 评论(0) 推荐(0) 编辑
摘要: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' 阅读全文
posted @ 2017-10-24 21:23 daniel456 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The 阅读全文
posted @ 2017-10-24 21:13 daniel456 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ 阅读全文
posted @ 2017-10-24 20:57 daniel456 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front 阅读全文
posted @ 2017-10-24 20:53 daniel456 阅读(68) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to 阅读全文
posted @ 2017-10-24 20:50 daniel456 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Implement a trie with insert, search, and startsWith methods. 题目含义:实现字典树的insert, search, 和startsWith 方法 字典树概念参考http://blog.csdn.net/u012501459/article 阅读全文
posted @ 2017-10-24 20:41 daniel456 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t 阅读全文
posted @ 2017-10-24 20:38 daniel456 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 48 下一页