第一次接触复杂性科学是在一本叫think complexity的书上,Allen博士很好的讲述了数据结构与复杂性科学,barabasi是一个知名的复杂性网络科学家,barabasilab则是他所主导的一个实验室,这里的笔记则是关于里面介绍的课程的slider的笔记,当然别人的课程不是公开课,所以从p...
分类:
Web程序 时间:
2015-03-29 17:58:44
阅读次数:
299
题目:leetcode
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 ...
分类:
其他好文 时间:
2015-03-29 12:23:21
阅读次数:
143
https://leetcode.com/problems/sort-list/Sort a linked list inO(nlogn) time using constant space complexity.解题思路:常见的O(nlogn)算法,快速排序、归并排序,堆排序。大概讲讲优缺点,在数...
分类:
其他好文 时间:
2015-03-28 21:32:10
阅读次数:
114
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 ...
分类:
其他好文 时间:
2015-03-21 22:51:10
阅读次数:
200
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:
其他好文 时间:
2015-03-20 20:04:57
阅读次数:
103
problem:
Merge k sorted linked lists and return it as one sorted list.
Analyze and describe its complexity.
Tags Divide and Conquer Linked List Heap
合并K个已序单链表
thinking:
(1)题目没有要求不可以新开ListN...
分类:
其他好文 时间:
2015-03-20 16:24:45
阅读次数:
114
Sort a linked list inO(nlogn) time using constant space complexity.Hide TagsLinked ListSort 基于单项链表的排序,时间为nlogn ,O(1)空间,其实及将数组的快速排序用链表实现,并用递归来维护拆分与合并。....
分类:
编程语言 时间:
2015-03-20 14:13:30
阅读次数:
135
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 not found in t...
分类:
其他好文 时间:
2015-03-18 23:18:45
阅读次数:
170
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 is in the arr...
分类:
其他好文 时间:
2015-03-18 14:04:10
阅读次数:
103
Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a sort...
分类:
其他好文 时间:
2015-03-18 00:52:51
阅读次数:
202