Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanghan234/algorithm-on-coursera
https://github.com/yanghan234/algorithm-on-coursera
algorithms coursera
Last synced: about 22 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/yanghan234/algorithm-on-coursera
- Owner: yanghan234
- Created: 2018-11-24T23:06:40.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T21:09:35.000Z (almost 6 years ago)
- Last Synced: 2024-04-06T08:24:02.807Z (9 months ago)
- Topics: algorithms, coursera
- Language: Java
- Size: 24.4 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Algorithms
This repository follows Princeton's class, Algorithms, part I and part II on coursera.## Chapter I: Fundamentals
This part introduced two basic data structures, queues and stacks. Detailed description of the two data structures and their implementations can be found [here](https://yanghan234.github.io/2019/01/05/2018_01_05_Queue_and_Stack/).
- [x] Queue
- [x] Stack### A case study: Union-Find
* Problem description:Given a set of numbers, implement at least two features: union() and find(). Union() method connects two numbers in the set while find() tells if two numbers in the set are connected or not.
- [x] Quick find algorithm
- [x] Quick union algorithm
- [x] Weighted quick union algorithm
- [x] Weighted quick union algorithm with path compression
The codes can be found [here](https://github.com/yanghan234/algorithm-on-coursera/tree/master/Week1_1).
- [ ] Detailed description of the algorithms needs to be added. Here I only summarize the complexity of the algorithms.| Algorithm | Constructor | union() | find() |
|:---:|:---:|:---:|:---:|
| quick find | *O*(N) | *O*(N) | *O*(1) |
| union find | *O*(N) | tree height | tree height |
| Weighted quick union | *O*(N) | *O*(lgN) | *O*(lgN) |
| Weighted quick union with path compression | *O*(N) | ~*O*(1) | ~*O*(1) |## Chapter II: Sorting Algorithms
* Elementary sorting algorithms:- [ ] Bubble sort
- [x] Selection sort
- [x] Insertion sort
- [x] Shell sort
* Advanced sorting algorithms:- [x] Merge sort
- [x] Quick sort
- [x] Heapsort ( Introduced later in chapter III )You might want to read my article on these methods here: [Sorting Algorithms](https://yanghan234.github.io/2018/12/21/Sorting-Algorithms/).
## Chapter III: Searching Algorithms
- [x] Binary tree
- [ ] 2-3-4 tree
- [x] Red-black tree
- [x] Hash table
- [x] Chaining
- [x] Linear probing## Chapter IV: Graph Algorithms
1. Graph representation
- [ ] Sparse matrix
- [x] Adjacency list
2. Undirected graph
- [x] Depth-first search (DFS)
- [x] Broadth-first search (BFS)
- [x] Applications:
- [x] Connected components
3. Directed graph (aka Digraph)
- [x] BFS & DFS
- [x] Applications:
- [x] Topological graph
- [x] Strong connected components
- [x] DAG & How to check DAG
4. Edge Weighted Graphs & Minimum spanning tree
- [x] Kruskal algorithm
- [x] Prim algorithm
- [x] Lazy implementation
- [x] Eager implementation
5. Edge Weighted Digraph & Shortest Path
- [x] Dijkstra algorithm
- [ ] SP in positive-weight DAG
- [ ] Bellman-Ford algorithm
- [ ] Negative cycle & how to check negative cycle
- [ ] Longest path6. String Algorithms
- [ ] To be added