Factorial Trailing Zeroes问题:Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.思...
分类:
其他好文 时间:
2015-04-02 18:26:49
阅读次数:
117
【题目】
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target...
分类:
其他好文 时间:
2015-04-02 15:04:37
阅读次数:
114
题目:
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 windo...
题目:
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 be O(log (m+n)).
思路:这道题比较直接的想法就是用Merge
Sort...
分类:
其他好文 时间:
2015-04-01 09:33:08
阅读次数:
143
Key Design Concepts
关键的设计概念
Managing complexity is the most important technical topic in software development.
管理的复杂性是软件开发中最重要的技术课题。
The goal of all software-design techniques is to break acomplica...
分类:
其他好文 时间:
2015-03-31 18:02:18
阅读次数:
194
第一次接触复杂性科学是在一本叫think complexity的书上,Allen博士很好的讲述了数据结构与复杂性科学,barabasi是一个知名的复杂性网络科学家,barabasilab则是他所主导的一个实验室,这里的笔记则是关于里面介绍的课程的slider的笔记,当然别人的课程不是公开课,所以从p...
分类:
Web程序 时间:
2015-03-31 14:15:33
阅读次数:
210
Median of Two Sorted Arrays
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 be O(log (m+n)).
解题...
分类:
其他好文 时间:
2015-03-30 16:37:48
阅读次数:
126
题目:
Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target is n...
分类:
其他好文 时间:
2015-03-30 11:19:17
阅读次数:
117
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...
Simple StringProblem's Link: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1550Mean:略。analyse:水题。Time complexity: O(n)Source code:// Memory Time...
分类:
其他好文 时间:
2015-03-29 23:18:15
阅读次数:
222