随笔分类 -  Code

编码在实践中成长,利润在压榨中产生
摘要:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu... 阅读全文
posted @ 2014-12-11 01:20 CBDoctor 阅读(347) 评论(0) 推荐(0) 编辑
摘要:A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index.... 阅读全文
posted @ 2014-12-10 02:07 CBDoctor 阅读(630) 评论(0) 推荐(0) 编辑
摘要:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes... 阅读全文
posted @ 2014-11-23 21:59 CBDoctor 阅读(905) 评论(0) 推荐(0) 编辑