This repo collects the algorithm animations and source codes based on the project algviz.
Algviz is an algorithm animatin engine implement in Python. You can learn more from algviz.com.
You can try all the algorithms with the Gitpod online editor by click this button below.
You can follow this guide to setup your local environment and clone this repo to start up.
If you would like to share your notebooks, please feel free to create PRs to this repo. All the shared code or notebooks are under GPL-v3 license.
Notebook | Description | Animation |
---|---|---|
BubbleSort.ipynb | Implement of the bubble sort algorithm. | |
MergeSort.ipynb | Animation of the merge sort algorithm. | |
QuickSort.ipynb | Animation of the quick sort algorithm. | |
AStarPathFinding.ipynb | An heuristic path finding algorithm for grid maps. | |
Fibonacci.ipynb | Calculate the fibonacci number. | |
NQueens.ipynb | The algorithm to solve the NQueens problem. | |
TraverseBinaryTree.ipynb | Show different ways to traverse a binary tree. Such as preorder, inorder, postorder, BFS. |
|
TrieTree.ipynb | The creation and use of trie tree. | |
InvertBinaryTree.ipynb | To solve the invert binary tree problem. | |
DisjointSet.ipynb | Disjoint-set is an efficient data structure for merge and find opeartion. Also called union-find set. |
|
TopologicalSorting.ipynb | Solve topological sorting problem with dfs and Kahns algorithm | |
Dijkstra.ipynb | Implement the famous Dijkstra algorithm. Calculate the shortest pathes from one vertex to all the other vertices in the graph. |
|
Floyd.ipynb | Calculate the shortest path of all the nodes in graph. Dynamic programing. |
|
Kruskal.ipynb | TODO | - |
Prim.ipynb | Generate the minimum span tree. Pick one vertex from the graph each time. |
|
SameTree.ipynb | SameTree leetcode | |
ReverseLinkedList | reverse-linked-list leetcode |