博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
一些有意思的算法代码[转载]
阅读量:5317 次
发布时间:2019-06-14

本文共 8080 字,大约阅读时间需要 26 分钟。

转载自:

 

Keith Schwarz是一个斯坦福大学计算机科学系的讲师。他对编程充满了热情。他的主页上他自己正在实现各种各样的有意思的算法和数据结构,, 目前这个网页上有88个(见下面的列表),但这位大哥要干135个,你可以看看他的。

从这个列表上,我们可以看到,他从去年7月份就在自己实现这些东西了,我把他实现的这些算法转过来,

  • 一方面我们可以学习一下这些算法和代码,因为很多东西对我来说都比较新,我以前,,还有, 不过感觉都没有这个全。
  • 另一方面我希望这个事可以影响到一些正在学习编程的人。看看别人是怎么学习编程的,希望对你有借鉴作用。
Name Link Date Added Language Description
Binomial Heap 7‑24‑2010 C++ An implementation of a  data structure for use as a priority queue.
Bounded Priority Queue 7‑24‑2010 C++ An implementation of a  with a fixed upper limit to its size..
Matrix 7‑24‑2010 C++ A collection of classes for manipulating .
VList 8‑16‑2010 Java An implementation of the List abstraction backed by a .
Function Wrapper 8‑16‑2010 C++ A C++ wrapper class around unary functions.
String 8‑17‑2010 C++ An implementation of a  abstraction that uses the small string optimization.

 

nstream 8‑31‑2010 C++ An stream class that sends and receives data over a network.
Snake 8‑31‑2010 C++ An implementation of the game  with a rudimentary AI.
Mergesort 9‑14‑2010 C++ An implementation of the  algorithm.
Next Permutation 10‑6‑2010 C++ An implementation of the  STL algorithm.
Interval Heap 10‑17‑2010 Java An implementation of a  using an .
Linear-Time Selection 10‑18‑2010 C++ A deterministic, linear-time  using the  algorithm.
Heapsort 10‑18‑2010 C++ An implementation of the  algorithm.
Union-Find 10‑19‑2010 Java An implementation of a  using a disjoint set forest.
Radix Sort 10‑19‑2010 C++ An implementation of the  algorithm.
Rational 10‑23‑2010 C++ A data structure representing a .
DPLL 10‑23‑2010 Haskell An implementation of the  for solving .
Smoothsort 10‑27‑2010 C++ An implementation of the , an adaptive heapsort variant.
Extendible Array 10‑28‑2010 Java A  class with O(1) worst-case runtime lookup and append.
In-Place Merge 10‑29‑2010 C++ An implementation of a  that runs .
Random Shuffle 10‑29‑2010 C++ An algorithm for generating a  of a set of elements.
Random Sample 10‑29‑2010 C++ An O(n) time, O(1) space algorithm for randomly choosing k elements out of a stream with uniform probability.
Natural Mergesort 10‑30‑2010 C++ An implementation of , an  variant of .
Interpolation Search 10‑31‑2010 C++ An implementation of the  algorithm.
Introsort 10‑31‑2010 C++ An implementation of the  algorithm, a fast hybrid of , , and.
Hashed Array Tree 11‑3‑2010 Java An implementation of a dynamic array backed by a .
Recurrence Solver 11‑13‑2010 C++ A fast algorithm for generating terms of a sequence defined by a .
Fibonacci Heap 11‑15‑2010 Java An implementation of a priority queue backed by a .
Dijkstra’s Algorithm 11‑16‑2010 Java An implementation of  for single-source shortest paths.
Prim’s Algorithm 11‑17‑2010 Java An implementation of  for computing .
Kruskal’s Algorithm 11‑17‑2010 Java An implementation of  for computing .
Majority Element 11‑17‑2010 C++ A fast, linear-time algorithm for finding the  of a data set.
Haar Transform 11‑17‑2010 C++ A set of functions to decompose a sequence of values into a sum of .
Argmax 11‑19‑2010 C++ A pair of functions to compute the  of a function on some range.
Derivative 11‑19‑2010 C++ A  that approximates the  of a function.
Levenshtein Distance 11‑19‑2010 C++ An algorithm for computing the  between two sequences.
Skiplist 11‑20‑2010 C++ An implementation of a , a randomized data structure for maintaining a sorted collection.
van Emde Boas Tree 11‑26‑2010 C++ An implementation of a sorted associative array backed by a .
Cuckoo HashMap 11‑27‑2010 Java An implementation of a  using .
Needleman-Wunsch Algorithm 11‑28‑2010 C++ An implementation of the  algorithm for optimal string alignment.
Treap 11‑28‑2010 C++ An implementation of a sorted associative array backed by a .
Floyd-Warshall Algorithm 12‑10‑2010 Java An implementation of the  for all-pairs shortest paths in a graph.
Power Iteration 12‑10‑2010 C++ An implementation of the  algorithm for finding dominant eigenvectors.
Edmonds’s Matching Algorithm 12‑15‑2010 Java An implementation of  for finding  in undirected graphs.
Kosaraju’s Algorithm 12‑15‑2010 Java An implementation of  algorithm for finding  of a directed graph.
2-SAT 12‑15‑2010 Java A linear-time algorithm for solving .
Bellman-Ford Algorithm 12‑17‑2010 Java An implementation of the  algorithm for single-source shortest paths.
Topological Sort 12‑17‑2010 Java An algorithm for computing a  of a directed acyclic graph.
Graham Scan 12‑19‑2010 C++ An implementation of the  for finding convex hulls in 2D space.
Bipartite Testing 12‑19‑2010 Java A linear-time algorithm for checking whether a directed graph is .
Johnson’s Algorithm 12‑19‑2010 Java An implementation of  for all-pairs shortest paths.
Strassen Algorithm 12‑20‑2010 C++ An implementation of the  for fast matrix multiplication.
Cartesian Tree Sort 12‑21‑2010 C++ An implementation of , an adaptive, out-of-place heapsort variant.
Ford-Fulkerson Algorithm 12‑21‑2010 Java An implementation of the  maximum-flow algorithm.
Scaling Ford-Fulkerson 12‑22‑2010 Java An modification of the  maximum-flow algorithm that uses scaling to achieve polynomial time..
Splay Tree 12‑27‑2010 C++ An implementation of a sorted associative array backed by a .
Ternary Search Tree 12‑28‑2010 C++ An implementation of a sorted set of strings backed by a .
Ring Buffer 12‑30‑2010 Java An implementation of a FIFO queue using a .
AVL Tree 12‑30‑2010 C++ A sorted associative container backed by an .
Rabin-Karp Algorithm 1‑1‑2011 C++ An implementation of the  for string matching.
RPN Evaluator 1‑18‑2011 C++ / strain A library to tokenize and evaluate simple arithmetic expressions in .
Shunting-Yard Algorithm 1‑18‑2011 C++ / strain An implementation of Dijkstra’s  for converting infix expressions to reverse-Polish notation.
Skew Binomial Heap 1‑20‑2011 C++ An implementation of a priority queue backed by a .
2/3 Heap 3‑1‑2011 C++ An implementation of a priority queue whose branching factor alternates at different levels to maximize performance.
Zeckendorf Logarithm 3‑10‑2011 C++ An algorithm based on  that efficiently computes logarithms.
Factoradic Permutations 3‑17‑2011 C++ A set of algorithms for generating  using the .
Binary Cyclic Subsets 3‑20‑2011 C++ A set of algorithms for generating  in  using .
Fibonacci Iterator 3‑22‑2011 C++ An STL-style iterator for iterating over the .
Fibonacci Search 3‑22‑2011 C++ An implementation of the  algorithm.
Euclid’s Algorithm 4‑18‑2011 Haskell An implementation of  and applications to  and .
Find Duplicate 4‑18‑2011 Python An algorithm to find a repeated element in an array using .
Permutation Generator 4‑19‑2011 Python A  for producing all  of a list of elements.
Matrix Find 4‑19‑2011 Python A solution to the classic interview question of searching a sorted matrix for a particular value.
Binary GCD 4‑23‑2011 Scheme An implementation of the  for computing greatest common divisors of nonnegative integers.
Knuth-Morris-Pratt Algorithm 5‑3‑2011 Python An implementation of the  for fast string matching.
Kadane’s Algorithm 5‑7‑2011 C++ An implementation of Kadane’s algorithm for solving the .
Karatsuba’s Algorithm 8‑15‑2011 Python An implementation of  for fast integer multiplication.
Min-Stack 8‑15‑2011 C++ An implementation of a  that supports O(1) push, pop, and find-minimum.
Random Bag 8‑15‑2011 Python A data structure that supports insertion and removal of a uniformly-random element.
Min-Queue 8‑15‑2011 C++ An implementation of a  that supports O(1) push, pop, and find-minimum.
Lights-Out Solver 8‑29‑2011 C++ A solver for the game  using  over .
Maximum Single-Sell Profit 11‑9‑2011 Python Four algorithms for the , each showing off a different algorithmic technique.
Generalized Kadane’s Algorithm 11‑10‑2011 C++ A generalization of  for solving the maximum subarray problem subject to a .
Longest Range 11‑19‑2011 Java An algorithm for solving the  problem.
Egyptian Fractions 11‑20‑2011 Python An implementation of the  for finding .
LL(1) Parser Generator 11‑21‑2011 Java An .
LR(0) Parser Generator 11‑23‑2011 Java An .
Word Ladders 11‑27‑2011 JavaScript A program for finding  between two words.

转载于:https://www.cnblogs.com/wufawei/archive/2011/12/18/2291650.html

你可能感兴趣的文章
读书笔记:季羡林关于如何做研究学问的心得
查看>>
面向对象的优点
查看>>
套接口和I/O通信
查看>>
mysqlslap 压力测试工具
查看>>
DWR与Spring结合
查看>>
[转]Eclipse下导入外部jar包的3种方式
查看>>
阿里巴巴面试之利用两个int值实现读写锁
查看>>
连续数字或英文字符文本强制换行
查看>>
DevExpress Carousel 设置水平滑动列表
查看>>
python总结--目录(转)
查看>>
成都同学聚会
查看>>
京华同学聚会
查看>>
@bzoj - 3750@ [POI2015] Pieczęć
查看>>
PHP定时任务
查看>>
浅谈性能测试
查看>>
Winform 菜单和工具栏控件
查看>>
jequery动态创建form
查看>>
CDH版本大数据集群下搭建的Hue详细启动步骤(图文详解)
查看>>
第六次java作业
查看>>
巧用Win+R
查看>>