My collection of algorithms and data structures from solving LeetCode problems. I use this to practice coding and learn new concepts.
https://leetcode.com/problemset/algorithms/
# Run all tests
npm test
# Run tests in watch mode
npm run test:watchdata-structures/priority-queue.ts- Min-heap priority queue implementationfind-union.ts- Union-Find (Disjoint Set) data structure
graphs/- Graph-related algorithms and problemsalgorithms/dijkstra.ts- Dijkstra's shortest path algorithmminimal-spanning-tree-kruskal.ts- Kruskal's MST algorithmfind-city-with-smallest-number-of-neighbors.ts- Floyd-Warshall all-pairs shortest path
trees/- Binary tree algorithms and problemsgreedy/- Greedy algorithm solutionscontainer-with-most-water/- Two-pointer greedy approachlongest-substring-without-repeating/- Sliding window technique3sum/,3sum-closest/- Multiple pointer strategies
divide-and-conquer/- Divide and conquer algorithmsquick-sort.ts- Quick sort implementation