1
1
# TypeScript-Algorithms-and-Data-Structures
2
2
3
- This Repo, at first, was only for [ JavaScript Algorithms and Data Structures Masterclass ] ( https://www.udemy.com/course/js-algorithms-and- data- structures-masterclass/ ) .
3
+ Collection of classical algorithms and data structures in TypeScript .
4
4
5
- But the objective of this project has increased, I want to implement algorithms and popular data structures in TypeScript/ JavaScript and solve programming assignments for popular online courses.
5
+ For each folder, there is an MD file with my main References for that section. But my favorite ones are:
6
6
7
- For each folder, there is a MD file with my main References for that section.
7
+ - [ Algorithms Specialization] ( https://www.coursera.org/specializations/algorithms ) .
8
+ - Example test case files are available in: [ stanford-algs] ( https://github.com/beaunus/stanford-algs ) .
9
+ Programming assignment solutions are not available in order to respect Coursera Honor Code.
10
+ - [ MIT 6.006 Introduction to Algorithms] ( https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/ )
11
+ - [ MIT 6.046J Design and Analysis of Algorithms] ( https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-design-and-analysis-of-algorithms-spring-2015/ )
12
+ - [ Introduction to Algorithms, 3rd Edition - CLRS] ( https://en.wikipedia.org/wiki/Introduction_to_Algorithms )
13
+ - [ Algorithm Design, 1st Edition] ( https://www.amazon.com/Algorithm-Design-Jon-Kleinberg/dp/0321295358 )
8
14
9
- ### [ Algorithms Specialization] ( https://www.coursera.org/specializations/algorithms ) .
10
-
11
- You can found Example Test Cases: [ stanford-algs] ( https://github.com/beaunus/stanford-algs ) .
12
-
13
- Programming assignment solutions are not available in order to respect Coursera Honor Code.
15
+ ---
14
16
15
17
### Data Structures
16
18
17
19
##### Basics:
18
20
19
- - [ Linked List] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/basics/linkedList.ts )
20
- - [ Doubly Linked List] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/basics/doublyList.ts )
21
- - [ Queue] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/basics/queue.ts )
22
- - [ Stack] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/basics/stack.ts )
21
+ - [ Linked List] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/basics/linkedList.ts )
22
+ - [ Doubly Linked List] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/basics/doublyList.ts )
23
+ - [ Queue] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/basics/queue.ts )
24
+ - [ Stack] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/basics/stack.ts )
23
25
24
26
##### Trees:
25
27
26
- - [ Binary Search Tree] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/trees/binarySearchTree.ts )
27
- - [ AVL Tree] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/trees/avlTree.ts )
28
- - [ Red Black Tree] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/trees/redBlackTree.ts )
28
+ - [ Binary Search Tree] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/trees/binarySearchTree.ts )
29
+ - [ AVL Tree] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/trees/avlTree.ts )
30
+ - [ Red Black Tree] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/trees/redBlackTree.ts )
29
31
30
32
##### Heaps:
31
33
32
- - [ Min Binary Heap] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/heaps/minHeap. )
33
- - [ Max Binary Heap] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/heaps/maxBinaryHeap.ts )
34
- - [ Min Fibonacci Heap] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/heaps/fibonacciHeap.ts )
34
+ - [ Min Binary Heap] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/heaps/minHeap. )
35
+ - [ Max Binary Heap] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/heaps/maxBinaryHeap.ts )
36
+ - [ Min Fibonacci Heap] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/heaps/fibonacciHeap.ts )
35
37
36
38
##### Hash Tables:
37
39
38
- - [ Separate Chaining] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/data-structures/hash-tables/hashTable.ts )
40
+ - [ Separate Chaining] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /data-structures/hash-tables/hashTable.ts )
39
41
40
42
##### Disjoint-set (Union-Find):
41
43
42
- - [ Linked List Representation] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/data-structures/disjoint-sets/listSet.ts )
43
- - [ Forest Representation] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/data-structures/disjoint-sets/forestSet.ts )
44
+ - [ Linked List Representation] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ data-structures/disjoint-sets/listSet.ts )
45
+ - [ Forest Representation] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ data-structures/disjoint-sets/forestSet.ts )
44
46
45
- ##### [ Graph:] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/data-structures/graph/graph.ts )
47
+ ##### [ Graph:] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ data-structures/graph/graph.ts )
46
48
47
49
- Karger Minimum Cut
48
50
- BFS
@@ -62,40 +64,40 @@ To visualize some Pathfinding Algorithms check: [Pathfinding Visualizer](https:/
62
64
63
65
### Sorting
64
66
65
- - [ Bubble Sort] ( https://github.com/LyangHiga/JavaScript-Algorithms-and-Data-Structures-Masterclass /blob/master/sort/bubbleSort.ts )
66
- - [ Insertion Sort] ( https://github.com/LyangHiga/JavaScript-Algorithms-and-Data-Structures-Masterclass /blob/master/sort/insertionSort.ts )
67
- - [ Selection Sort] ( https://github.com/LyangHiga/JavaScript-Algorithms-and-Data-Structures-Masterclass /blob/master/sort/selectionSort.ts )
68
- - [ Heap Sort] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/sort/heapSort.ts )
69
- - [ Merge Sort] ( https://github.com/LyangHiga/JavaScript-Algorithms-and-Data-Structures-Masterclass /blob/master/sort/mergeSort.ts )
70
- - [ Quick Sort] ( https://github.com/LyangHiga/JavaScript-Algorithms-and-Data-Structures-Masterclass /blob/master/sort/quickSort.ts )
71
- - [ Radix Sort] ( https://github.com/LyangHiga/JavaScript-Algorithms-and-Data-Structures-Masterclass /blob/master/sort/radixSort.ts )
67
+ - [ Bubble Sort] ( https://github.com/LyangHiga/typescript-algorithms-data-structures /blob/master/src /sort/bubbleSort.ts )
68
+ - [ Insertion Sort] ( https://github.com/LyangHiga/typescript-algorithms-data-structures /blob/master/src /sort/insertionSort.ts )
69
+ - [ Selection Sort] ( https://github.com/LyangHiga/typescript-algorithms-data-structures /blob/master/src /sort/selectionSort.ts )
70
+ - [ Heap Sort] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /sort/heapSort.ts )
71
+ - [ Merge Sort] ( https://github.com/LyangHiga/typescript-algorithms-data-structures /blob/master/src /sort/mergeSort.ts )
72
+ - [ Quick Sort] ( https://github.com/LyangHiga/typescript-algorithms-data-structures /blob/master/src /sort/quickSort.ts )
73
+ - [ Radix Sort] ( https://github.com/LyangHiga/typescript-algorithms-data-structures /blob/master/src /sort/radixSort.ts )
72
74
73
75
To visualize some of them check [ Sorting Visualizer] ( https://lyanghiga.github.io/sorting-visualizer/ )
74
76
75
77
### Divide and Conquer
76
78
77
- - [ Karatsuba Multiplication] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/divide-and-conquer/karatsuba.ts )
78
- - [ Merge Sort] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/sort/mergeSort.ts )
79
- - [ Counting Inversions] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/divide-and-conquer/countingInversions.ts )
80
- - [ Maximum Sum Subarray Problem] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/divide-and-conquer/maxSubarr.ts )
81
- - [ Closest Pair of Points Problem] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/divide-and-conquer/closestPair.ts )
82
- - [ Quicksort] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/sort/quickSort.ts )
83
- - [ Linear Time Selection: Random and Deterministic] ( https://github.com/LyangHiga/javaScript -algorithms-data-structures/blob/master/divide-and-conquer/selection.ts )
79
+ - [ Karatsuba Multiplication] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /divide-and-conquer/karatsuba.ts )
80
+ - [ Merge Sort] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /sort/mergeSort.ts )
81
+ - [ Counting Inversions] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /divide-and-conquer/countingInversions.ts )
82
+ - [ Maximum Sum Subarray Problem] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /divide-and-conquer/maxSubarr.ts )
83
+ - [ Closest Pair of Points Problem] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /divide-and-conquer/closestPair.ts )
84
+ - [ Quicksort] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /sort/quickSort.ts )
85
+ - [ Linear Time Selection: Random and Deterministic] ( https://github.com/LyangHiga/typescript -algorithms-data-structures/blob/master/src /divide-and-conquer/selection.ts )
84
86
85
87
### Greedy
86
88
87
- - [ Dijkstra] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/data-structures/graph.ts )
88
- - [ Prim] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/data-structures/graph.ts )
89
- - [ Kruskal - Single-Link Clustering] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/data-structures/graph.ts )
90
- - [ Scheduling Application] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/greedy/scheduling/scheduling.ts )
91
- - [ Huffman Coding] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/greedy/huffman-coding/huffman.ts )
92
- - [ Nearest Neighbor Heuristic TSP] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/tsp/tsp.ts )
89
+ - [ Dijkstra] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ data-structures/graph.ts )
90
+ - [ Prim] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ data-structures/graph.ts )
91
+ - [ Kruskal - Single-Link Clustering] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ data-structures/graph.ts )
92
+ - [ Scheduling Application] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ greedy/scheduling/scheduling.ts )
93
+ - [ Huffman Coding] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ greedy/huffman-coding/huffman.ts )
94
+ - [ Nearest Neighbor Heuristic TSP] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ tsp/tsp.ts )
93
95
94
96
### Dynamic Programming
95
97
96
- - [ Weighted Interval Scheduling] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/dynamic-programming/weighted-interval-scheduling/wis.ts )
97
- - [ Max Weight Independent Set] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/dynamic-programming/mwis.ts )
98
- - [ Knapsack] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/dynamic-programming/knapsack/knapsack.ts )
99
- - [ Sequence Alignment] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/dynamic-programming/sequenceAlignment.ts )
100
- - [ Bellman-Ford] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/data-structures/graph.ts )
101
- - [ Floyd-Warshall] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/data-structures/graph.ts )
98
+ - [ Weighted Interval Scheduling] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ dynamic-programming/weighted-interval-scheduling/wis.ts )
99
+ - [ Max Weight Independent Set] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ dynamic-programming/mwis.ts )
100
+ - [ Knapsack] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ dynamic-programming/knapsack/knapsack.ts )
101
+ - [ Sequence Alignment] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ dynamic-programming/sequenceAlignment.ts )
102
+ - [ Bellman-Ford] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ data-structures/graph.ts )
103
+ - [ Floyd-Warshall] ( https://github.com/LyangHiga/typescript-algorithms-data-structures/blob/master/src/ data-structures/graph.ts )
0 commit comments