Skip to content

Wan-Ge/Algorithms-Edition-4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms-4th-Edition

All of the above code is the basic algorithm in Algorithm-4th-Edtion, These are very basic things.

At the moment, i just added the original book without giving the sorting visualization window code. To facilitate myself and those who need it to view and study. (2017/03/17)

Hope you will like it ! ^ _ ^

Dependencies: algs4.jar

Data files: http://algs4.cs.princeton.edu/code/algs4.jar

Tips: There is a problem worthy of our attention. The stack used in book(or algs4.jar) is not the same as the JDK. In fact, there is a bug in JDK of Stack since JDK 1.3, while you use foreach loop to iterate an array, you will find that the order isn't from bottom to top as you like. It will iterate it from top to bottom. More information you can see this article (CSDN_Blog) or official website(Oracle).

Modified for a test.

Chapter 2 - Sort

2017/03/20

  • Binary Heap Sort(sink)

2017/03/19

  • Quick3way (array contains many duplicate numbers)

2017/03/18

  • Quick Sort

2017/03/13

  • Select Sort
  • Insert Sort
  • Merge Sort (Top-Down)
  • Merge Sort(Bottom-Up)

Chapter 3 - Search

2017/03/28

  • RedBlackTree (2-3 tree)

2017/03/26

  • Interpolation Search (like binary search)
  • Binary Search Tree (Key-Value)

2017/03/21

  • Binary Search(Recursive and Iterative)

Chapter 4 - Graphs

2017/04/01

  • Prim MST
  • Index minimum priority queue
  • Lazy prim MST

2017/03/31

  • EdgeWeightedGraph
  • Transitive Closure
  • KosarajuSCC
  • Topological sort
  • Directed cycle
  • Symbol digraph

2017/03/30

  • Breadth first paths
  • CComponent
  • Directed DFS
  • Depth first paths
  • Depth first order

2017/03/29

  • Symbol Graph
  • Depth First Search (contains paths)
  • Breadth First Search (contains paths)
  • Connected Component

contains "Sort Compare" and others pre-algorithm like "less", "exch"... etc.

visualization window now only can paint RED(has been moved) and GRAY(not been moved)

About

Basic algorithm of Algorithms-Edition-4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages