Author: Yang Shan, Department of Management Science and Engineering, Tongji University
Environment:Apple clang version 11.0.3 (clang-1103.0.32.59), Xcode 11.4.1
This repository contains code and my notes data structures and algorithms taught in Prof. Liang Zhe's class. Algorithms in file [Final Exam Preparation&Algorithm](Final Exam Preparation&Algorithm) are achieved by myself, some of the other algorithms are adapted from nice code provided by others online and some are programmed by myself.
My notes for these algorithms will be added to this file soon.
The best example for divide and conquer is merge sort which divides a large sorting problem into some small compare problems. This algorithm is robust and quick.
For example, quick sort's average time complexity is Θ(nlgn) and the worest case O(n^2).
Source Code: Buble Sort
Source Code: Merge Sort
Source Code: Bucket Sort
Source Code: Binary Sort
Source Code: Quick Sort
Source Code: Random Quick Sort
Source Code: Count Sort
Source Code: Heap Sort
Source Code: Insertion Sort
Source Code: Radix Sort
Source Code: Select Sort
Source Code:Binary Tree
Source Code:Linked List
Source Code:Double Linked List
Source Code:Queue and Stack
Source Code:Hash Table
Source Code:Red Black Tree
Source Code:Linear Table
Source Code:BFS
Source Code:DFS
Source Code:Graph Search
Source Code:Min Heapify
Source Code:All pairs shortest paths
Source Code:Bellman Ford
Source Code:Dijkstra
Source Code:DAG Shortest Path
Source Code:Floyd Warshall
Source Code:Topology
Source Code:Tarjan
Source Code:MST