http://en.wikipedia.org/wiki/Recursion_(computer_science)#Recursive_functions_and_algorithmsA commoncomputer programmingtactic is to divide a problem ...
分类:
其他好文 时间:
2014-06-15 22:47:35
阅读次数:
197
There are two places that SSL will need to be configured if SSL is to be used between the controller and the Open vSwtich. The instructions below assu...
分类:
其他好文 时间:
2014-06-15 21:59:43
阅读次数:
337
原题地址:https://oj.leetcode.com/problems/merge-two-sorted-lists/题意:Merge two sorted linked lists and return it as a new list. The new list should be made...
分类:
编程语言 时间:
2014-06-15 21:58:31
阅读次数:
238
题目
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is read off as "one
1" or 11.
11 is read off as "two
1s" or 21.
21 i...
分类:
其他好文 时间:
2014-06-15 18:51:33
阅读次数:
220
题目
Given a sorted array of integers, find the starting and ending position of a given target value.
解题思路:
查找一个数出现的范围,给一个排好序的数组和一个数,找出这个数在数组中出现的范围。
这个题直接使用一次遍历就可以得到结果,这样的时间复杂度为O(n)。但是对于有序数组我们一般可以使用二分查找可以得到更好的O(logn)的时间复杂度。我们可以使用二分查找找到这个数第一次出现的位置和这个数最后一次出现的位...
分类:
其他好文 时间:
2014-06-15 16:19:16
阅读次数:
237
题目
Given a collection of integers that might contain duplicates, S, return all possible subsets.
原题链接(点我)
解题思路
这个题很subsets这个题一样,不过这里允许给出的集合中含有重复元素,对于这个条件之需要加一个判断条件就可以了,其余代码和Subsets都一样。
代码实现.......
分类:
其他好文 时间:
2014-06-15 08:28:53
阅读次数:
166
http://acm.hdu.edu.cn/game/entry/problem/list.php?chapterid=1§ionid=21.2.5
#include
/*
题意:找闰年。
if((i%4==0 && i%100!=0) || i%400==0)count++;
3
2005 25
1855 12
2004 10000
2108
1904
43236
*/
int ma...
分类:
其他好文 时间:
2014-06-14 06:32:08
阅读次数:
320
题目
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
方法
将num1与0-9相乘的结果存...
分类:
其他好文 时间:
2014-06-14 06:08:30
阅读次数:
229
Number Sequence
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 10239 Accepted Submission(s): 4656
Problem Description
Given two se...
分类:
其他好文 时间:
2014-06-14 00:22:38
阅读次数:
243
题目
Given a set of distinct integers, S, return all possible subsets.
原题链接(点我)
解题思路
子集合问题。给一个集合 ,求出其所有的子集合。这个题也是个组合问题--老思路:递归加循环。
代码实现......
分类:
其他好文 时间:
2014-06-13 21:28:42
阅读次数:
252