├── .gitignore ├── Adhoc + Basic ├── Reservoir_sampling.cpp ├── Sieve_of_Eratosthenes.cpp ├── Two_Pointer.cpp ├── binary_search_I.cpp ├── binary_search_II.cpp └── binary_search_III.cpp ├── Arrays ├── MedianOfSortedArrays.cpp ├── MedianOfStream.cpp ├── MonotonicStack.cpp ├── Sliding Window Max.cpp ├── TrappingRainwater.cpp └── readme.md ├── Bit-mask └── Bitmask_Basic.cpp ├── DP ├── LCS.cpp ├── LIS.cpp ├── LongestPalindromicSubstring.cpp ├── LongestPanlidromicSubsequence.cpp ├── MatrixChainMulti.cpp ├── PalindromicCuts.cpp ├── digit_dp.cpp └── travelling_salesman_prob.cpp ├── Geometry └── anglecoverted.cpp ├── Graph ├── BFS.cpp ├── Bellman_ford(Negative_weights).cpp ├── Bipartite_Coloring.cpp ├── Bipartite_matching.cpp ├── DFS.cpp ├── FloydWarshall.cpp ├── README.md ├── cycleDetection.cpp ├── dijkstra.cpp ├── prims_algo.cpp ├── topological_sort.cpp └── union_find_algo.cpp ├── Greedy or DP (Problems) ├── Continuous_subarray_sum.cpp ├── Job_scheduling.cpp ├── Kadane.cpp ├── Queue_Reconstruction.cpp ├── jump_problem.cpp └── variations.txt ├── Matrix or Backtracking(Problems) └── Max_Submatrix_with_LT_Ksum.cpp ├── NumberTheory └── RandomNum.cpp ├── OS Concept based algos └── LRU-Cache.cpp ├── Quick Revise Documents ├── Recursion_BackTracking.pdf ├── System-Design-educative.io.pdf ├── Trees_Part_1.pdf └── Trees_Part_2.pdf ├── README.md ├── Range_queries ├── Mo's_algo.cpp ├── Persisitant tree.cpp ├── Range_Update(Difference_Array).cpp ├── Segment_trees.cpp ├── sparce_table.cpp ├── sqrt_decomposition.cpp └── which_to_use_when.txt ├── Sorting Algorithms ├── HeapSort.cpp ├── Inbuilt_sorting_algos.cpp ├── MergeSort.cpp ├── O(n^2)_Algos.cpp ├── QuickSort.cpp ├── RadixSort.cpp └── cycleSort.cpp ├── Strings ├── KMP.cpp ├── PatternMatching.cpp └── string_input.cpp ├── Trees ├── Binary_Lifting.cpp ├── LCA.cpp ├── WordSearch2.cpp └── trie.cpp └── codesnippet.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/* -------------------------------------------------------------------------------- /Adhoc + Basic/Reservoir_sampling.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Adhoc + Basic/Reservoir_sampling.cpp -------------------------------------------------------------------------------- /Adhoc + Basic/Sieve_of_Eratosthenes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Adhoc + Basic/Sieve_of_Eratosthenes.cpp -------------------------------------------------------------------------------- /Adhoc + Basic/Two_Pointer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Adhoc + Basic/Two_Pointer.cpp -------------------------------------------------------------------------------- /Adhoc + Basic/binary_search_I.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Adhoc + Basic/binary_search_I.cpp -------------------------------------------------------------------------------- /Adhoc + Basic/binary_search_II.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Adhoc + Basic/binary_search_II.cpp -------------------------------------------------------------------------------- /Adhoc + Basic/binary_search_III.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Adhoc + Basic/binary_search_III.cpp -------------------------------------------------------------------------------- /Arrays/MedianOfSortedArrays.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Arrays/MedianOfSortedArrays.cpp -------------------------------------------------------------------------------- /Arrays/MedianOfStream.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Arrays/MedianOfStream.cpp -------------------------------------------------------------------------------- /Arrays/MonotonicStack.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Arrays/MonotonicStack.cpp -------------------------------------------------------------------------------- /Arrays/Sliding Window Max.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Arrays/Sliding Window Max.cpp -------------------------------------------------------------------------------- /Arrays/TrappingRainwater.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Arrays/TrappingRainwater.cpp -------------------------------------------------------------------------------- /Arrays/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Arrays/readme.md -------------------------------------------------------------------------------- /Bit-mask/Bitmask_Basic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Bit-mask/Bitmask_Basic.cpp -------------------------------------------------------------------------------- /DP/LCS.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/DP/LCS.cpp -------------------------------------------------------------------------------- /DP/LIS.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/DP/LIS.cpp -------------------------------------------------------------------------------- /DP/LongestPalindromicSubstring.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/DP/LongestPalindromicSubstring.cpp -------------------------------------------------------------------------------- /DP/LongestPanlidromicSubsequence.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/DP/LongestPanlidromicSubsequence.cpp -------------------------------------------------------------------------------- /DP/MatrixChainMulti.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/DP/MatrixChainMulti.cpp -------------------------------------------------------------------------------- /DP/PalindromicCuts.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/DP/PalindromicCuts.cpp -------------------------------------------------------------------------------- /DP/digit_dp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/DP/digit_dp.cpp -------------------------------------------------------------------------------- /DP/travelling_salesman_prob.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/DP/travelling_salesman_prob.cpp -------------------------------------------------------------------------------- /Geometry/anglecoverted.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Geometry/anglecoverted.cpp -------------------------------------------------------------------------------- /Graph/BFS.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/BFS.cpp -------------------------------------------------------------------------------- /Graph/Bellman_ford(Negative_weights).cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/Bellman_ford(Negative_weights).cpp -------------------------------------------------------------------------------- /Graph/Bipartite_Coloring.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/Bipartite_Coloring.cpp -------------------------------------------------------------------------------- /Graph/Bipartite_matching.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/Bipartite_matching.cpp -------------------------------------------------------------------------------- /Graph/DFS.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/DFS.cpp -------------------------------------------------------------------------------- /Graph/FloydWarshall.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/FloydWarshall.cpp -------------------------------------------------------------------------------- /Graph/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/README.md -------------------------------------------------------------------------------- /Graph/cycleDetection.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/cycleDetection.cpp -------------------------------------------------------------------------------- /Graph/dijkstra.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/dijkstra.cpp -------------------------------------------------------------------------------- /Graph/prims_algo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/prims_algo.cpp -------------------------------------------------------------------------------- /Graph/topological_sort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/topological_sort.cpp -------------------------------------------------------------------------------- /Graph/union_find_algo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Graph/union_find_algo.cpp -------------------------------------------------------------------------------- /Greedy or DP (Problems)/Continuous_subarray_sum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Greedy or DP (Problems)/Continuous_subarray_sum.cpp -------------------------------------------------------------------------------- /Greedy or DP (Problems)/Job_scheduling.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Greedy or DP (Problems)/Job_scheduling.cpp -------------------------------------------------------------------------------- /Greedy or DP (Problems)/Kadane.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Greedy or DP (Problems)/Kadane.cpp -------------------------------------------------------------------------------- /Greedy or DP (Problems)/Queue_Reconstruction.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Greedy or DP (Problems)/Queue_Reconstruction.cpp -------------------------------------------------------------------------------- /Greedy or DP (Problems)/jump_problem.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Greedy or DP (Problems)/jump_problem.cpp -------------------------------------------------------------------------------- /Greedy or DP (Problems)/variations.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Greedy or DP (Problems)/variations.txt -------------------------------------------------------------------------------- /Matrix or Backtracking(Problems)/Max_Submatrix_with_LT_Ksum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Matrix or Backtracking(Problems)/Max_Submatrix_with_LT_Ksum.cpp -------------------------------------------------------------------------------- /NumberTheory/RandomNum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/NumberTheory/RandomNum.cpp -------------------------------------------------------------------------------- /OS Concept based algos/LRU-Cache.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/OS Concept based algos/LRU-Cache.cpp -------------------------------------------------------------------------------- /Quick Revise Documents/Recursion_BackTracking.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Quick Revise Documents/Recursion_BackTracking.pdf -------------------------------------------------------------------------------- /Quick Revise Documents/System-Design-educative.io.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Quick Revise Documents/System-Design-educative.io.pdf -------------------------------------------------------------------------------- /Quick Revise Documents/Trees_Part_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Quick Revise Documents/Trees_Part_1.pdf -------------------------------------------------------------------------------- /Quick Revise Documents/Trees_Part_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Quick Revise Documents/Trees_Part_2.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/README.md -------------------------------------------------------------------------------- /Range_queries/Mo's_algo.cpp: -------------------------------------------------------------------------------- 1 | // Find number of elements ocuuring only once in range [L,R]. -------------------------------------------------------------------------------- /Range_queries/Persisitant tree.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Range_queries/Range_Update(Difference_Array).cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Range_queries/Range_Update(Difference_Array).cpp -------------------------------------------------------------------------------- /Range_queries/Segment_trees.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Range_queries/Segment_trees.cpp -------------------------------------------------------------------------------- /Range_queries/sparce_table.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Range_queries/sparce_table.cpp -------------------------------------------------------------------------------- /Range_queries/sqrt_decomposition.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Range_queries/which_to_use_when.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Range_queries/which_to_use_when.txt -------------------------------------------------------------------------------- /Sorting Algorithms/HeapSort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Sorting Algorithms/HeapSort.cpp -------------------------------------------------------------------------------- /Sorting Algorithms/Inbuilt_sorting_algos.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Sorting Algorithms/Inbuilt_sorting_algos.cpp -------------------------------------------------------------------------------- /Sorting Algorithms/MergeSort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Sorting Algorithms/MergeSort.cpp -------------------------------------------------------------------------------- /Sorting Algorithms/O(n^2)_Algos.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Sorting Algorithms/O(n^2)_Algos.cpp -------------------------------------------------------------------------------- /Sorting Algorithms/QuickSort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Sorting Algorithms/QuickSort.cpp -------------------------------------------------------------------------------- /Sorting Algorithms/RadixSort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Sorting Algorithms/RadixSort.cpp -------------------------------------------------------------------------------- /Sorting Algorithms/cycleSort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Sorting Algorithms/cycleSort.cpp -------------------------------------------------------------------------------- /Strings/KMP.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Strings/KMP.cpp -------------------------------------------------------------------------------- /Strings/PatternMatching.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Strings/PatternMatching.cpp -------------------------------------------------------------------------------- /Strings/string_input.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Strings/string_input.cpp -------------------------------------------------------------------------------- /Trees/Binary_Lifting.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Trees/Binary_Lifting.cpp -------------------------------------------------------------------------------- /Trees/LCA.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Trees/LCA.cpp -------------------------------------------------------------------------------- /Trees/WordSearch2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Trees/WordSearch2.cpp -------------------------------------------------------------------------------- /Trees/trie.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/Trees/trie.cpp -------------------------------------------------------------------------------- /codesnippet.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nisarg0/Algorithm-Implementation/HEAD/codesnippet.cpp --------------------------------------------------------------------------------