小小程序媛 |
|
||
得之坦然,失之淡然,顺其自然,争其必然 |
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 –>... 阅读全文
2015年11月2日
摘要:
题目Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 000000101001010000011110100111... 阅读全文
摘要:
题目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... 阅读全文
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... 阅读全文
摘要:
题目Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2... 阅读全文
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... 阅读全文
摘要:
题目Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) – Push element x onto stack. pop()... 阅读全文
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 ... 阅读全文
摘要:
题目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 ... 阅读全文
2015年10月27日
摘要:
题目Sort a linked list using insertion sort.分析实现链表的插入排序注意:程序入口的特殊输入判断处理!节点的链接处理,避免出现断链! AC代码/** * Definition for singly-linked list. * struct L... 阅读全文
|
Copyright © 2024 Coding菌
Powered by .NET 9.0 on Kubernetes |