Must be Learn DSA in 2025
A self-motivated and enthusiastic web developer with a deep interest in JavaScript (React.js). To work in the Software industry with modern web technologies of different local & multinational Software/ IT agencies of Bangladesh and grow rapidly with increasing responsibilities.
🔹 Basic Level (Concepts)
📌 Data Structures
Arrays (1D, 2D, Dynamic Arrays)
Find the Maximum and Minimum Elements – Linear Search
Reverse an Array – Two-Pointer Approach
Rotate an Array (Left/Right) – Cyclic Replacement / Reversal Algorithm
Find the Second Largest and Second Smallest Elements – Linear Search
Remove Duplicates from a Sorted Array – Two-Pointer Approach
Find the Intersection and Union of Two Arrays – HashSet
Find the Missing Number in an Array of
1 to N– XOR / Summation FormulaFind Pairs with a Given Sum (
Two Sum) – HashMapFind Triplets with a Given Sum (
Three Sum) – Sorting + Two-PointerMerge Two Sorted Arrays – Two-Pointer Approach
Find the Majority Element (Appears More than N/2 Times) – Moore’s Voting Algorithm
Find the Median of Two Sorted Arrays – Binary Search
Find the Subarray with Maximum Sum – Kadane’s Algorithm
Find the Longest Consecutive Sequence – HashSet
Find the Smallest Subarray with a Given Sum – Sliding Window
Find the Next Permutation of an Array – Lexicographic Order
Find the Product of Array Except Self – Prefix & Suffix Multiplication
Find the First Missing Positive Integer – Cycle Sort
Find the Kth Largest Element – QuickSelect / Heap
Check if an Array is a Subset of Another Array – HashSet / Sorting + Two-Pointer
Rearrange an Array in Alternating Positive and Negative Order – Two-Pointer Approach
Find All Duplicates in an Array – HashMap / Cycle Sort
Find the Peak Element in an Array – Binary Search
Find the Maximum Length of a Subarray with Sum
0– HashMap (Prefix Sum)
Strings (Character arrays, String manipulation)
Reverse a String – Two-Pointer Approach
Check if a String is Palindrome – Two-Pointer Approach
Find the Length of a String – Built-in Function
Convert Uppercase to Lowercase and Vice Versa – ASCII Manipulation
Remove Whitespaces from a String – String Traversal
Count Vowels and Consonants in a String – String Traversal
Find the First Non-Repeating Character – HashMap (Frequency Count)
Check if Two Strings are Anagrams – Sorting or HashMap
Find All Substrings of a String – Brute Force or Sliding Window
Implement String Matching (Substring Search) – KMP Algorithm / Rabin-Karp Algorithm
Find the Longest Repeating Substring – Suffix Array or Dynamic Programming
Find the Longest Palindromic Substring – Manacher’s Algorithm or Expand Around Center
Find the Longest Common Prefix – Binary Search or Trie
Find the Edit Distance between Two Strings – Dynamic Programming (Levenshtein Distance)
Find the Shortest Unique Substring (Smallest Window Containing All Characters) – Sliding Window
Group Anagrams from a List of Words – HashMap with Sorted Strings
Check if One String is a Rotation of Another – Concatenation & Substring Search
Find the Longest Word in a Sentence – String Traversal
Generate All Permutations of a String – Backtracking
Find the Most Frequent Word in a Text – HashMap (Word Count)
Linked Lists (Singly, Doubly, Circular)
Insert a Node at the Beginning – Pointer Manipulation
Insert a Node at the End – Pointer Traversal
Insert a Node at a Specific Position – Pointer Traversal
Delete a Node by Value – Pointer Manipulation
Delete a Node at a Given Position – Pointer Traversal
Search for an Element in the List – Linear Search
Reverse a Linked List – Iterative & Recursive Approach
Find the Middle of a Linked List – Two-Pointer (Slow & Fast)
Detect a Cycle in a Linked List – Floyd’s Cycle Detection Algorithm (Tortoise & Hare)
Remove a Cycle in a Linked List – Floyd’s Algorithm
Insert a Node at the Beginning – Update
prev&nextPointersInsert a Node at the End – Pointer Traversal
Insert a Node at a Specific Position – Pointer Traversal
Delete a Node from the Beginning – Pointer Manipulation
Delete a Node from the End – Pointer Traversal
Delete a Node at a Given Position – Pointer Manipulation
Reverse a Doubly Linked List – Pointer Swapping
Find the Length of a Doubly Linked List – Pointer Traversal
Sort a Doubly Linked List – Merge Sort / Insertion Sort
Insert a Node in a Circular Linked List – Handle
head&nextPointersDelete a Node from a Circular Linked List – Pointer Traversal
Search for an Element in a Circular Linked List – Loop Detection
Split a Circular Linked List into Two Halves – Two-Pointer Approach
Check if a Circular Linked List is Sorted – Pointer Traversal
Convert a Singly Linked List to a Circular Linked List – Pointer Manipulation
Stacks (LIFO, Applications: Undo, Bracket Matching)
Basic Stack Operations
Push an Element onto a Stack – Array / Linked List Implementation
Pop an Element from a Stack – Array / Linked List Implementation
Peek (Top Element of Stack) – Direct Access
Check if Stack is Empty – Boolean Check
Check Stack Size – Length Property
Intermediate Stack Operations
Reverse a String using a Stack – Stack-Based Character Manipulation
Check for Balanced Parentheses – Stack-Based Matching
Convert Infix Expression to Postfix – Shunting Yard Algorithm
Evaluate a Postfix Expression – Stack-Based Evaluation
Sort a Stack using Recursion – Recursive Sorting
Advanced Stack Operations
Find the Next Greater Element in an Array – Monotonic Stack
Find the Next Smaller Element in an Array – Monotonic Stack
Largest Rectangle in a Histogram – Monotonic Stack
Trapping Rain Water Problem – Two-Pointer & Stack-Based Approach
Design a Min Stack (Stack with GetMin in O(1) Time Complexity) – Two Stacks Approach
Implement a Stack Using Two Queues – Queue-Based Stack Simulation
Implement a Queue Using Two Stacks – Stack-Based Queue Simulation
Find the Celebrity in a Party – Stack-Based Pairwise Elimination
Check if a Given Stack Sequence is Valid – Stack Simulation
Stock Span Problem – Monotonic Stack
Queues (FIFO, Applications: Scheduling, BFS)
Basic Queue Operations
Enqueue (Insert an Element at the End) – Array / Linked List Implementation
Dequeue (Remove an Element from the Front) – Array / Linked List Implementation
Peek (Front Element of the Queue) – Direct Access
Check if Queue is Empty – Boolean Check
Check Queue Size – Length Property
Intermediate Queue Operations
Implement a Circular Queue – Fixed-Size Array Implementation
Implement a Deque (Double-Ended Queue) – Linked List / Doubly-Linked List
Reverse a Queue using Recursion – Recursive Approach
Reverse First K Elements of a Queue – Stack & Queue Combination
Check if a Given Sequence is a Valid Queue Operation – Queue Simulation
Advanced Queue Operations
Implement a Queue using Two Stacks – Stack-Based Queue Simulation
Implement a Stack using Two Queues – Queue-Based Stack Simulation
Find the First Non-Repeating Character in a Stream – Queue & HashMap
LRU (Least Recently Used) Cache Implementation – Queue & HashMap
Sliding Window Maximum Problem – Monotonic Queue
Number of Islands in a Grid – BFS Using Queue
Rotten Oranges Problem (Time to Rot All Oranges) – BFS Using Queue
Course Schedule Problem (Topological Sorting) – Kahn’s Algorithm (BFS)
Implement a Priority Queue (Min Heap / Max Heap) – Heap-Based Queue
Design a Task Scheduler – Priority Queue (Heap) Based Scheduling
Hashing (Hash Tables, Hash Maps, Sets, Collisions)
Basic Hashing Operations
Create a Hash Map – Using Built-in
mapInsert Key-Value Pair into a Hash Map – Using
mapGet Value by Key from a Hash Map – Using
mapDelete a Key-Value Pair from a Hash Map – Using
mapCheck if a Key Exists in a Hash Map – Using
mapIterate Over a Hash Map – Using
forloopCreate a Hash Set – Using
mapwith empty structInsert an Element into a Hash Set – Using
mapCheck if an Element Exists in a Hash Set – Using
mapDelete an Element from a Hash Set – Using
map
Intermediate Hashing Operations
Find All Duplicates in an Array – Using a Hash Map for Frequency Count
Check if Two Arrays are Anagrams – Using Hash Maps
Find First Non-Repeating Character in a String – Using Hash Map
Count the Frequency of Elements in an Array – Using Hash Map
Group Anagrams from a List of Words – Using Hash Map with Sorted Key
Check if Subarrays of Array have Equal Sum – Using Hash Map with Prefix Sum
Find the Longest Substring Without Repeating Characters – Using Hash Map
Check if Subset Sum Exists – Using Hash Map for Dynamic Programming
Implement a Hash Table with Custom Hash Function – Handling Collisions
Implement a Set Data Structure – Using
mapas a Set
Advanced Hashing Operations
Handle Collisions in Hash Table – Chaining or Open Addressing
Rehashing a Hash Map – Doubling Size and Rehashing Keys
Design and Implement a Hash Table – Handling Collisions with Chaining or Linear Probing
LRU Cache Implementation – Using Hash Map and Doubly Linked List
Design a HashMap with Custom Hash Function – Handling Collisions Efficiently
Find the Intersection of Two Arrays – Using Hash Sets
Find Pair with Given Sum in an Array – Using Hash Map
Count Distinct Elements in a Window – Using Hash Map
Design a Randomized Set (Insert, Remove, Get Random) – Using Hash Map
Count the Number of Subarrays with Given Sum – Using Hash Map with Prefix Sum
📌 Algorithms
Sorting Algorithms
Bubble Sort
Selection Sort
Searching Algorithms
Linear Search
Basic Recursion (Factorial, Fibonacci, Tower of Hanoi)
Mathematical Algorithms (GCD, LCM, Prime numbers, Sieve of Eratosthenes)
🔹 Medium Level (Intermediate Concepts)
These are crucial for real-world problem-solving and competitive programming.
📌 Data Structures
Binary Trees & Binary Search Trees (BST)
Inorder, Preorder, Postorder Traversal
Balanced BST (AVL Trees, Red-Black Trees)
Heaps & Priority Queues (Min-Heap, Max-Heap, Heap Sort)
Trie (Prefix Tree) (Used in Dictionary, Auto-complete)
Graph Basics (Adjacency Matrix/List, BFS, DFS)
Disjoint Set (Union-Find, Path Compression)
Segment Trees & Fenwick Trees (Binary Indexed Tree - BIT)
📌 Algorithms
Divide and Conquer (Merge Sort, Quick Sort, Exponentiation)
Greedy Algorithms (Huffman Encoding, Activity Selection)
Backtracking (N-Queens, Sudoku Solver, Subset Sum)
Dynamic Programming (DP)
Fibonacci (Memoization vs. Tabulation)
Knapsack Problem
Longest Common Subsequence (LCS)
Longest Increasing Subsequence (LIS)
Coin Change Problem
-
Dijkstra’s Algorithm (Shortest Path)
Floyd-Warshall Algorithm (All-Pairs Shortest Path)
Bellman-Ford Algorithm
Topological Sorting (Kahn’s Algorithm, DFS)
🔹 Advanced Level (High-Performance & Scalable DSA)
Master these for high-performance software and system design.
📌 Data Structures
Advanced Trees
B-Trees & B+ Trees (Used in Databases)
Segment Trees (Range Queries)
Fenwick Tree (Efficient BIT for range sums)
Treap (Combination of Tree and Heap)
Graph Data Structures
Adjacency List Optimization
Strongly Connected Components (Kosaraju’s Algorithm)
Euler Tour
Network Flow (Ford-Fulkerson Algorithm)
Skip Lists (Used in Databases like Redis)
Bloom Filters (Probabilistic Data Structure for Membership Testing)
📌 Algorithms
Advanced Graph Algorithms
Kruskal’s & Prim’s Algorithm (Minimum Spanning Tree)
A* Search Algorithm
Tarjan’s Algorithm (Strongly Connected Components)
Floyd-Warshall & Johnson’s Algorithm (Graph Shortest Paths)
Advanced Dynamic Programming
Matrix Chain Multiplication
DP with Bitmasking
DP on Trees
String Algorithms
KMP (Knuth-Morris-Pratt)
Rabin-Karp (String Matching)
Z Algorithm
Suffix Arrays & LCP (Longest Common Prefix)
Bit Manipulation
XOR Tricks
Gray Code
Number Theory
Modular Exponentiation
Fermat’s Theorem
Chinese Remainder Theorem
Approximation & Randomized Algorithms
Parallel & Distributed Algorithms (MapReduce, Paxos, Raft)
🎯 Final Thoughts
Master Basic & Medium topics before diving into Advanced concepts.
Practice on LeetCode, Codeforces, AtCoder, and CodeChef.
Understand how DSA is used in system design & real-world applications (Databases, Load Balancing, Web Caching).
Focus on Time & Space Complexity (Big-O Analysis).




