上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 27 下一页
摘要: Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a lin... 阅读全文
posted @ 2014-11-20 16:58 陆草纯 阅读(1895) 评论(1) 推荐(1)
摘要: LRU CacheDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get... 阅读全文
posted @ 2014-11-19 19:18 陆草纯 阅读(413) 评论(0) 推荐(0)
摘要: Min StackDesign a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -... 阅读全文
posted @ 2014-11-18 15:04 陆草纯 阅读(2315) 评论(0) 推荐(0)
摘要: Copy List with Random PointerA linked list is given such that each node contains an additional random pointer which could point to any node in the lis... 阅读全文
posted @ 2014-11-18 14:41 陆草纯 阅读(229) 评论(0) 推荐(0)
摘要: Word BreakGiven a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.... 阅读全文
posted @ 2014-11-16 20:21 陆草纯 阅读(757) 评论(0) 推荐(0)
摘要: Binary Tree Preorder TraversalGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ... 阅读全文
posted @ 2014-11-14 16:15 陆草纯 阅读(203) 评论(0) 推荐(0)
摘要: Binary Tree Postorder TraversalGiven a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \... 阅读全文
posted @ 2014-11-14 16:07 陆草纯 阅读(397) 评论(0) 推荐(0)
摘要: Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click... 阅读全文
posted @ 2014-11-12 11:27 陆草纯 阅读(236) 评论(0) 推荐(0)
摘要: Maximum Product SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given... 阅读全文
posted @ 2014-11-11 16:52 陆草纯 阅读(2354) 评论(0) 推荐(0)
摘要: Find Minimum in Rotated Sorted Array IIFollow up for "Find Minimum in Rotated Sorted Array": What if duplicates are allowed?Would this affect the run-... 阅读全文
posted @ 2014-11-07 15:36 陆草纯 阅读(3230) 评论(0) 推荐(1)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 27 下一页