上一页 1 2 3 4 5 6 ··· 17 下一页
摘要: 二分法相关 153. Find Minimum in Rotated Sorted Array Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might 阅读全文
posted @ 2016-12-15 22:15 wangxiaobao1114 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 字典树(Trie树相关) 208. Implement Trie (Prefix Tree) Implement a trie with insert, search, and startsWith methods. (Medium) Note:You may assume that all inp 阅读全文
posted @ 2016-12-14 22:18 wangxiaobao1114 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 数学题 172. Factorial Trailing Zeroes Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time c 阅读全文
posted @ 2016-12-13 22:32 wangxiaobao1114 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 位运算相关 三道题 231. Power of Two 位运算相关 三道题 231. Power of Two Given an integer, write a function to determine if it is a power of two. (Easy) 分析: 数字相关题有的可以考 阅读全文
posted @ 2016-12-12 20:05 wangxiaobao1114 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a stack using queues. (Easy) push(x) -- Push element x onto stack. pop() -- Removes the element on top of the st 阅读全文
posted @ 2016-12-08 21:32 wangxiaobao1114 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. (Medium) Valid operators are +, -, *, /. Each operand may be an integer or 阅读全文
posted @ 2016-12-08 21:27 wangxiaobao1114 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. (Easy) For example,"A man, a plan, a can 阅读全文
posted @ 2016-12-06 22:06 wangxiaobao1114 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. (Hard) For example,Given [100, 4, 200, 1, 3, 2],The 阅读全文
posted @ 2016-12-05 21:55 wangxiaobao1114 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the maximum path sum. (Hard) For this problem, a path is defined as any sequence of nodes from some starting node to any nod 阅读全文
posted @ 2016-12-01 21:40 wangxiaobao1114 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2016-11-25 23:59 wangxiaobao1114 阅读(334) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 17 下一页