上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 36 下一页
摘要: 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 @ 2016-08-05 12:34 LiBlog 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports all following operations in O(1) time. Example: Analysis: For O(1) insert and remove, we need HashMap. For O(1) 阅读全文
posted @ 2016-08-04 14:02 LiBlog 阅读(441) 评论(0) 推荐(0) 编辑
摘要: The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou 阅读全文
posted @ 2016-08-02 13:00 LiBlog 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Note: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself a new place for his thievery so tha 阅读全文
posted @ 2016-08-02 12:32 LiBlog 阅读(123) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2016-08-01 15:02 LiBlog 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam 阅读全文
posted @ 2016-08-01 14:32 LiBlog 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Your algorithm 阅读全文
posted @ 2016-08-01 09:54 LiBlog 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of longest increasing subsequence. For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The longest i 阅读全文
posted @ 2016-08-01 09:37 LiBlog 阅读(119) 评论(0) 推荐(0) 编辑
摘要: You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the w 阅读全文
posted @ 2016-08-01 09:30 LiBlog 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Given n = 2, return 91. (The answer should be the 阅读全文
posted @ 2016-07-31 08:12 LiBlog 阅读(124) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 36 下一页