Important Problems for DSA

December 29, 2025

๐Ÿ”ข Sorting Algorithms

  • ๐Ÿซง Bubble Sort โ€” swap neighbors again & again (slow ๐Ÿข)
  • ๐ŸŽฏ Selection Sort โ€” pick minimum and place it correctly
  • ๐Ÿงฉ Insertion Sort โ€” insert like playing cards โ™ ๏ธ
  • โšก Quick Sort โ€” divide by pivot (fast on average ๐Ÿš€)
  • ๐Ÿงฌ Merge Sort โ€” divide โ†’ sort โ†’ merge (stable)
  • ๐Ÿ—๏ธ Heap Sort โ€” uses heap data structure
  • ๐Ÿ”ข Radix Sort โ€” digit-by-digit sorting
  • ๐Ÿš Shell Sort โ€” gap-based insertion sort
  • ๐Ÿชฃ Bucket Sort โ€” distribute into buckets, then sort
  • ๐Ÿงฎ Counting Sort โ€” count frequencies (non-comparison)

๐Ÿ” Searching Algorithms

  • ๐Ÿšถ Linear Search โ€” check one by one
  • ๐Ÿ”Ž Binary Search โ€” works only on sorted data ๐Ÿ“
  • ๐Ÿฆ˜ Jump Search โ€” jump ahead in fixed blocks
  • ๐Ÿ“ˆ Interpolation Search โ€” predicts position
  • ๐Ÿš€ Exponential Search โ€” expands range exponentially
  • ๐Ÿ”— Sublist Search โ€” find linked list inside another
  • ๐Ÿง  Boyerโ€“Moore Algorithm โ€” smart string skipping
  • ๐Ÿ” Rabinโ€“Karp Algorithm โ€” hashing + string matching
  • ๐Ÿ—‚๏ธ Hashing โ€” O(1) average lookup
  • ๐Ÿ”บ Ternary Search โ€” split into three parts

๐Ÿง  Divide and Conquer

  • ๐Ÿ”Ž Binary Search โ€” split & conquer
  • ๐Ÿงฌ Merge Sort โ€” recursive merging
  • โšก Quick Sort โ€” partition around pivot
  • ๐Ÿ“ Closest Pair of Points โ€” geometry problem
  • ๐Ÿงฎ Strassenโ€™s Matrix Multiplication โ€” faster matrix multiply
  • โœ–๏ธ Karatsuba Multiplication โ€” fast large number multiplication
  • ๐Ÿ“‰ Maximum Subarray Problem โ€” Kadane + D&C
  • ๐ŸŒŠ FFT (Fast Fourier Transform) โ€” signal processing
  • ๐Ÿ”„ Counting Inversions โ€” measure disorder
  • ๐Ÿ—ผ Tower of Hanoi โ€” classic recursion puzzle

๐Ÿ’ฐ Greedy Algorithms

  • ๐Ÿ—“๏ธ Activity Selection Problem โ€” max non-overlapping tasks
  • ๐ŸŽ’ Fractional Knapsack โ€” take fractions
  • ๐Ÿ”ค Huffman Coding โ€” optimal compression
  • ๐Ÿง‘โ€๐Ÿ’ผ Job Scheduling Problem โ€” maximize profit
  • ๐ŸŒฒ Primโ€™s Algorithm โ€” minimum spanning tree
  • ๐Ÿ›ฃ๏ธ Dijkstraโ€™s Algorithm โ€” shortest path (no negative edges)
  • ๐Ÿ”— Kruskalโ€™s Algorithm โ€” MST using sorting + union-find

๐Ÿงฎ Dynamic Programming (DP)

  • ๐ŸŽ’ 0/1 Knapsack โ€” pick or skip
  • โ™พ๏ธ Unbounded Knapsack โ€” unlimited items
  • ๐Ÿ’ฐ Coin Change โ€” number of ways / min coins
  • ๐Ÿชข Rope Cutting โ€” maximize product
  • ๐Ÿ”— LCS (Longest Common Subsequence) โ€” string matching
  • ๐Ÿ“ˆ LIS (Longest Increasing Subsequence) โ€” sequence DP
  • ๐Ÿ”ข MCM (Matrix Chain Multiplication) โ€” parenthesization
  • ๐Ÿšฆ Bellmanโ€“Ford โ€” shortest path (negative edges allowed)
  • ๐ŸŒ Floydโ€“Warshall โ€” all-pairs shortest path