Stanford Algo
文章平均质量分 83
neostar2008
这个作者很懒,什么都没留下…
展开
-
Stanford 算法入门 week1 algorithm for closest pair
参考: http://www.cs.ucsb.edu/~suri/cs235/ClosestPair.pdf One dimension, Two dimension, n - dimension原创 2012-06-21 16:56:30 · 422 阅读 · 0 评论 -
Stanford 算法入门 Week 4 Graph,BFS,DFS, partial_sort
用DFS进行拓扑排序 求强连通分量:kosaraju's algorithm 这篇例文比较好 http://scienceblogs.com/goodmath/2007/10/30/computing-strongly-connected-c/ Key Lemma: ---------------------------------------------------------原创 2012-07-19 15:46:58 · 1181 阅读 · 0 评论 -
悲剧的斯坦福算法入门Assignment 1……fin.eof 函数详解
题目: Download the text file here. (Right click and save link as) This file contains all of the 100,000 integers between 1 and 100,000 (inclusive) in some random order, with no integer repeated.原创 2012-06-16 02:28:58 · 1205 阅读 · 0 评论 -
Stanford 算法入门 week 5 dijkstra 及其堆优化 stringstream
-------------------------------------------------------- Question 1 In this programming problem you'll code up Dijkstra's shortest-path algorithm. Download the text file here. (Right click原创 2012-07-21 02:06:53 · 1617 阅读 · 0 评论 -
Stanford 算法入门 week 6 Bloom Filter, Hash Function, Search Tree
Bloom Filter 讲解:http://blog.csdn.net/jiaomeng/article/details/1495500 ----------------------------------------------------------------------------------------------------------------------- Pr原创 2012-07-26 12:40:10 · 1939 阅读 · 0 评论 -
Stanford 算法入门 week 3 Assignment
Question 5 The minimum s-t cut problem is the following. The input is an undirected graph, and two distinct vertices of the graph are labelled "s" and "t". The goal is to compute the minimum cut (i原创 2012-07-05 23:21:12 · 3555 阅读 · 0 评论 -
Stanford 算法入门 week 2 Assignment QuickSort
这周主要解决快排 1. 如果pivot不是第一个元素,就把选定的pivot元素和第一个元素swap,然后照流程走 2. int ChoosePivot(vector & data, int start, int end) 选择median 元素做pivot的时候,记住中位数middle 不等于 (end - start + 1) / 2,而应该加上起点 middle = ((end - st原创 2012-06-26 01:15:17 · 416 阅读 · 0 评论