|
1 | 1 | # DataStructures and Algorithms in C/C++
|
2 | 2 |
|
3 |
| -This code is written by Amit Bansal while learning Data structures and algorithms. |
4 |
| -References GFG, NPTEL, CLRS. |
| 3 | +This code is written by Amit Bansal while learning Data structures and algorithms. |
| 4 | +References GFG, NPTEL, CLRS. |
5 | 5 |
|
6 | 6 | This repository contains:
|
7 | 7 | =========================
|
8 | 8 |
|
9 |
| -Singly Linked List. |
| 9 | +Singly Linked List. |
10 | 10 | ----------------
|
11 |
| - Add Two Numbers Represented By Linked List. |
12 |
| - Bubble Sort in Linked List |
13 |
| - Merge Sort in Linked List |
14 |
| - Merge Sorted Linked List |
15 |
| - Reverse a singly Linked List with or without using stack |
| 11 | + Add Two Numbers Represented By Linked List. |
| 12 | + Bubble Sort in Linked List |
| 13 | + Merge Sort in Linked List |
| 14 | + Merge Sorted Linked List |
| 15 | + Reverse a singly Linked List with or without using stack |
16 | 16 |
|
17 |
| -Doubly Linked List. |
| 17 | +Doubly Linked List. |
18 | 18 | ----------------
|
19 | 19 |
|
20 |
| -Circular Linked List. |
| 20 | +Circular Linked List. |
21 | 21 | ----------------
|
22 |
| - Sorted Insert |
| 22 | + Sorted Insert |
23 | 23 |
|
24 |
| -Stack using array and Linked List. |
| 24 | +Stack using array and Linked List. |
25 | 25 | --------------------------------
|
26 | 26 |
|
27 |
| -Queue using array and Linked List. |
| 27 | +Queue using array and Linked List. |
28 | 28 | ----------------------------------------
|
29 | 29 |
|
30 |
| -Priority Queue. |
| 30 | +Priority Queue. |
31 | 31 | ----------------
|
32 | 32 |
|
33 |
| -Sorting: |
| 33 | +Sorting: |
34 | 34 | --------
|
35 |
| - Bubble Sort |
36 |
| - Heap Sort |
37 |
| - Insertion Sort |
38 |
| - Merge Sort |
39 |
| - Quick Sort |
40 |
| - Selection Sort |
41 |
| - |
42 |
| -Binary Search Tree |
| 35 | + Bubble Sort |
| 36 | + Heap Sort |
| 37 | + Insertion Sort |
| 38 | + Merge Sort |
| 39 | + Quick Sort |
| 40 | + Selection Sort |
| 41 | + |
| 42 | +Binary Search Tree |
43 | 43 | ----------------
|
44 |
| - Insertion |
45 |
| - Deletion |
46 |
| - Preorder traversal |
47 |
| - Inorder traversal |
48 |
| - Postorder traversal |
49 |
| - Level order traversal |
50 |
| - Find Height of a Binary Search Tree |
51 |
| - Check if a Tree is Binary Search Tree or not(2 methods) |
52 |
| - Find Max and Min element in Binary Search Tree |
53 |
| - |
54 |
| -AVL trees |
| 44 | + Insertion |
| 45 | + Deletion |
| 46 | + Preorder traversal |
| 47 | + Inorder traversal |
| 48 | + Postorder traversal |
| 49 | + Level order traversal |
| 50 | + Find Height of a Binary Search Tree |
| 51 | + Check if a Tree is Binary Search Tree or not(2 methods) |
| 52 | + Find Max and Min element in Binary Search Tree |
| 53 | + |
| 54 | +AVL trees |
55 | 55 | --------
|
56 |
| - a.Insertion |
57 |
| - b.Deletion |
| 56 | + a.Insertion |
| 57 | + b.Deletion |
58 | 58 |
|
59 |
| -Red Black Trees |
| 59 | +Red Black Trees |
60 | 60 | --------
|
61 |
| - Insertion |
62 |
| - Deletion |
| 61 | + Insertion |
| 62 | + Deletion |
63 | 63 |
|
64 |
| -Tries |
| 64 | +Tries |
65 | 65 | --------
|
66 |
| - Insert |
67 |
| - Delete |
68 |
| - Search |
| 66 | + Insert |
| 67 | + Delete |
| 68 | + Search |
69 | 69 |
|
70 |
| -Graphs |
| 70 | +Graphs |
71 | 71 | --------
|
72 |
| - Breadth First Search |
73 |
| - Depth Search Search |
74 |
| - Kosaraju's algorithm for strongly connected components |
75 |
| - Dijkstra's algorithm for single source shortest paths |
76 |
| - Kruskal’s Minimum Spanning Tree Algorithm |
77 |
| - Topological Sorting |
78 |
| - Prims algorithm for minimum spanning tree using STL |
79 |
| - Floyd Warshall Algorithm for all pairs shortest paths |
80 |
| - Bellmanford algorithm for single source shortest path and negative edge cycle detection |
81 |
| - Detect a cycle using DFS |
82 |
| - Sortest Paths using Breadth First Search |
83 |
| - Check if an undirected Graph is eulerian. |
84 |
| - Find diameter of a tree using BFS |
85 |
| - Check if a graph is Bipartite using BFS |
86 |
| - Longest path in a directed acyclic graph |
87 |
| - |
88 |
| -Flow Networks |
| 72 | + Breadth First Search |
| 73 | + Depth Search Search |
| 74 | + Kosaraju's algorithm for strongly connected components |
| 75 | + Dijkstra's algorithm for single source shortest paths |
| 76 | + Kruskal’s Minimum Spanning Tree Algorithm |
| 77 | + Topological Sorting |
| 78 | + Prims algorithm for minimum spanning tree using STL |
| 79 | + Floyd Warshall Algorithm for all pairs shortest paths |
| 80 | + Bellmanford algorithm for single source shortest path and negative edge cycle detection |
| 81 | + Detect a cycle using DFS |
| 82 | + Sortest Paths using Breadth First Search |
| 83 | + Check if an undirected Graph is eulerian. |
| 84 | + Find diameter of a tree using BFS |
| 85 | + Check if a graph is Bipartite using BFS |
| 86 | + Longest path in a directed acyclic graph |
| 87 | + |
| 88 | +Flow Networks |
89 | 89 | ------------
|
90 |
| - Ford-Fulkerson Algorithm for Maximum Flow |
| 90 | + Ford-Fulkerson Algorithm for Maximum Flow |
91 | 91 |
|
92 |
| -Greedy Algorithms |
| 92 | +Greedy Algorithms |
93 | 93 | ----------------
|
94 |
| - Activity Selection Problem. |
95 |
| - Kruskal’s Minimum Spanning Tree Algorithm |
96 |
| - Dijkstra's algorithm for single source shortest paths |
97 |
| - Minimize Lateness problem |
98 |
| - Huffman Coding |
| 94 | + Activity Selection Problem. |
| 95 | + Kruskal’s Minimum Spanning Tree Algorithm |
| 96 | + Dijkstra's algorithm for single source shortest paths |
| 97 | + Minimize Lateness problem |
| 98 | + Huffman Coding |
99 | 99 |
|
100 |
| -Dynamic Programming |
| 100 | +Dynamic Programming |
101 | 101 | ----------------
|
102 |
| - Boolean Parenthesization Problem |
103 |
| - Edit Distance |
104 |
| - Knapsack problem with repetitions |
105 |
| - Knapsack Problem |
106 |
| - Longest Increasing Subsequence |
107 |
| - Maximum Value Contiguous Subsequence |
108 |
| - Optimal Strategy for a Game |
109 |
| - Optimal binary search trees |
110 |
| - RNA Secondary structure |
111 |
| - Rod Cutting |
112 |
| - Balanced Partition |
113 |
| - Box stacking |
114 |
| - Building Bridges |
115 |
| - Fibonnaci Numbers |
116 |
| - Longest increasing subsequence |
117 |
| - Maximum Value Contiguous Subsequence |
118 |
| - Subset Sum Problem |
119 |
| - Coin Changing Problem |
120 |
| - |
121 |
| - |
122 |
| -Strings, Sets |
| 102 | + Boolean Parenthesization Problem |
| 103 | + Edit Distance |
| 104 | + Knapsack problem with repetitions |
| 105 | + Knapsack Problem |
| 106 | + Longest Increasing Subsequence |
| 107 | + Maximum Value Contiguous Subsequence |
| 108 | + Optimal Strategy for a Game |
| 109 | + Optimal binary search trees |
| 110 | + RNA Secondary structure |
| 111 | + Rod Cutting |
| 112 | + Balanced Partition |
| 113 | + Box stacking |
| 114 | + Building Bridges |
| 115 | + Fibonnaci Numbers |
| 116 | + Longest increasing subsequence |
| 117 | + Maximum Value Contiguous Subsequence |
| 118 | + Subset Sum Problem |
| 119 | + Coin Changing Problem |
| 120 | + |
| 121 | + |
| 122 | +Backtracking |
123 | 123 | -------------
|
124 |
| - Find occurrences of all characters in a string |
125 |
| - String Permutation Algorithm |
126 |
| - Find Power Set of a set |
| 124 | + alphacode: All possible codes that an integer string can generate |
| 125 | + String Permutation Algorithm |
| 126 | + Find Power Set of a set |
127 | 127 |
|
128 | 128 | Segment Tree
|
129 | 129 | -------------
|
130 |
| - Range Minimum Query |
131 |
| - Range Sum Query |
| 130 | + Range Minimum Query |
| 131 | + Range Sum Query |
132 | 132 |
|
0 commit comments