题目:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.链接:http://leetcode.com/problems/merge-k-sorted-list...
分类:
其他好文 时间:
2015-04-17 15:34:07
阅读次数:
122
Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.思路:编程之美里有,就是找因子5的个数。int trail...
分类:
其他好文 时间:
2015-04-17 15:27:58
阅读次数:
106
题目:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should ...
分类:
其他好文 时间:
2015-04-15 21:16:28
阅读次数:
105
Title:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.排好序的,然后merge,很容易让人联想到归并排序。可以将k个序列按照二分进行分割,然后当长度为...
分类:
其他好文 时间:
2015-04-15 09:26:46
阅读次数:
124
1017 - Exact coverProblem's Link: http://acm.hust.edu.cn/problem/show/1017Mean:略analyse:ATime complexity: O(n)Source code:#include #include #include #...
分类:
其他好文 时间:
2015-04-15 00:43:14
阅读次数:
194
/** * ID: 24 * Name: Swap Nodes in Pairs * Data Structure: Linked List * Time Complexity: * Space Complexity: * Tag: LinkList * Difficult: Medium ...
分类:
其他好文 时间:
2015-04-14 07:10:45
阅读次数:
127
/** * ID: 92 * Name: Reverse Linked List * Data Structure: Linked List * Time Complexity: * Space Complexity: * Tag: LinkList * Difficult: Medium ...
分类:
其他好文 时间:
2015-04-14 07:04:18
阅读次数:
192
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BAN...
Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.cracking interview原题,2*5可以构成一...
分类:
其他好文 时间:
2015-04-13 09:25:10
阅读次数:
111
/** * ID: 2 * Name: Add Two Numbers * Data Structure: Linked List * Time Complexity: * Space Complexity: * Tag: LinkList * Difficult: Medium * Pro...
分类:
其他好文 时间:
2015-04-13 06:54:00
阅读次数:
169