小小程序媛  
得之坦然,失之淡然,顺其自然,争其必然
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 34 下一页

2015年11月3日

摘要: 题目Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –>... 阅读全文
posted @ 2015-11-03 13:23 Coding菌 阅读(110) 评论(0) 推荐(0) 编辑

2015年11月2日

摘要: 题目Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 000000101001010000011110100111... 阅读全文
posted @ 2015-11-02 20:54 Coding菌 阅读(489) 评论(0) 推荐(0) 编辑
 
摘要: 题目Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2... 阅读全文
posted @ 2015-11-02 20:17 Coding菌 阅读(111) 评论(0) 推荐(0) 编辑

2015年11月1日

摘要: 题目Given an input string, reverse the string word by word.For example, Given s = “the sky is blue”, return “blue is sky the”.Update (2015-02-1... 阅读全文
posted @ 2015-11-01 15:07 Coding菌 阅读(427) 评论(0) 推荐(0) 编辑
 
摘要: 题目Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2... 阅读全文
posted @ 2015-11-01 14:00 Coding菌 阅读(172) 评论(0) 推荐(0) 编辑

2015年10月31日

摘要: 题目Follow up for “Find Minimum in Rotated Sorted Array”: What if duplicates are allowed?Would this affect the run-time complexity? How and why... 阅读全文
posted @ 2015-10-31 14:02 Coding菌 阅读(129) 评论(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()... 阅读全文
posted @ 2015-10-31 13:16 Coding菌 阅读(120) 评论(0) 推荐(0) 编辑

2015年10月30日

摘要: 题目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 ... 阅读全文
posted @ 2015-10-30 17:03 Coding菌 阅读(160) 评论(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 ... 阅读全文
posted @ 2015-10-30 16:22 Coding菌 阅读(117) 评论(0) 推荐(0) 编辑

2015年10月27日

摘要: 题目Sort a linked list using insertion sort.分析实现链表的插入排序注意:程序入口的特殊输入判断处理!节点的链接处理,避免出现断链! AC代码/** * Definition for singly-linked list. * struct L... 阅读全文
posted @ 2015-10-27 13:00 Coding菌 阅读(130) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 34 下一页