Skip to main content

Command Palette

Search for a command to run...

Must be Learn DSA in 2025

Updated
10 min read
M

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

  1. 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 Formula

    • Find Pairs with a Given Sum (Two Sum) – HashMap

    • Find Triplets with a Given Sum (Three Sum) – Sorting + Two-Pointer

    • Merge 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)

  2. 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)

  3. 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 & next Pointers

    • Insert 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 & next Pointers

    • Delete 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


  4. Stacks (LIFO, Applications: Undo, Bracket Matching)

    1. Basic Stack Operations

      1. Push an Element onto a Stack – Array / Linked List Implementation

      2. Pop an Element from a Stack – Array / Linked List Implementation

      3. Peek (Top Element of Stack) – Direct Access

      4. Check if Stack is Empty – Boolean Check

      5. Check Stack Size – Length Property

Intermediate Stack Operations

  1. Reverse a String using a Stack – Stack-Based Character Manipulation

  2. Check for Balanced Parentheses – Stack-Based Matching

  3. Convert Infix Expression to Postfix – Shunting Yard Algorithm

  4. Evaluate a Postfix Expression – Stack-Based Evaluation

  5. Sort a Stack using Recursion – Recursive Sorting

Advanced Stack Operations

  1. Find the Next Greater Element in an Array – Monotonic Stack

  2. Find the Next Smaller Element in an Array – Monotonic Stack

  3. Largest Rectangle in a Histogram – Monotonic Stack

  4. Trapping Rain Water Problem – Two-Pointer & Stack-Based Approach

  5. Design a Min Stack (Stack with GetMin in O(1) Time Complexity) – Two Stacks Approach

  6. Implement a Stack Using Two Queues – Queue-Based Stack Simulation

  7. Implement a Queue Using Two Stacks – Stack-Based Queue Simulation

  8. Find the Celebrity in a Party – Stack-Based Pairwise Elimination

  9. Check if a Given Stack Sequence is Valid – Stack Simulation

  10. Stock Span Problem – Monotonic Stack

  1. Queues (FIFO, Applications: Scheduling, BFS)

    1. Basic Queue Operations

      1. Enqueue (Insert an Element at the End) – Array / Linked List Implementation

      2. Dequeue (Remove an Element from the Front) – Array / Linked List Implementation

      3. Peek (Front Element of the Queue) – Direct Access

      4. Check if Queue is Empty – Boolean Check

      5. Check Queue Size – Length Property

Intermediate Queue Operations

  1. Implement a Circular Queue – Fixed-Size Array Implementation

  2. Implement a Deque (Double-Ended Queue) – Linked List / Doubly-Linked List

  3. Reverse a Queue using Recursion – Recursive Approach

  4. Reverse First K Elements of a Queue – Stack & Queue Combination

  5. Check if a Given Sequence is a Valid Queue Operation – Queue Simulation

Advanced Queue Operations

  1. Implement a Queue using Two Stacks – Stack-Based Queue Simulation

  2. Implement a Stack using Two Queues – Queue-Based Stack Simulation

  3. Find the First Non-Repeating Character in a Stream – Queue & HashMap

  4. LRU (Least Recently Used) Cache Implementation – Queue & HashMap

  5. Sliding Window Maximum Problem – Monotonic Queue

  6. Number of Islands in a Grid – BFS Using Queue

  7. Rotten Oranges Problem (Time to Rot All Oranges) – BFS Using Queue

  8. Course Schedule Problem (Topological Sorting) – Kahn’s Algorithm (BFS)

  9. Implement a Priority Queue (Min Heap / Max Heap) – Heap-Based Queue

  10. Design a Task Scheduler – Priority Queue (Heap) Based Scheduling

  1. Hashing (Hash Tables, Hash Maps, Sets, Collisions)

    • Basic Hashing Operations

      1. Create a Hash Map – Using Built-in map

      2. Insert Key-Value Pair into a Hash Map – Using map

      3. Get Value by Key from a Hash Map – Using map

      4. Delete a Key-Value Pair from a Hash Map – Using map

      5. Check if a Key Exists in a Hash Map – Using map

      6. Iterate Over a Hash Map – Using for loop

      7. Create a Hash Set – Using map with empty struct

      8. Insert an Element into a Hash Set – Using map

      9. Check if an Element Exists in a Hash Set – Using map

      10. Delete an Element from a Hash Set – Using map

Intermediate Hashing Operations

  1. Find All Duplicates in an Array – Using a Hash Map for Frequency Count

  2. Check if Two Arrays are Anagrams – Using Hash Maps

  3. Find First Non-Repeating Character in a String – Using Hash Map

  4. Count the Frequency of Elements in an Array – Using Hash Map

  5. Group Anagrams from a List of Words – Using Hash Map with Sorted Key

  6. Check if Subarrays of Array have Equal Sum – Using Hash Map with Prefix Sum

  7. Find the Longest Substring Without Repeating Characters – Using Hash Map

  8. Check if Subset Sum Exists – Using Hash Map for Dynamic Programming

  9. Implement a Hash Table with Custom Hash Function – Handling Collisions

  10. Implement a Set Data Structure – Using map as a Set

Advanced Hashing Operations

  1. Handle Collisions in Hash Table – Chaining or Open Addressing

  2. Rehashing a Hash Map – Doubling Size and Rehashing Keys

  3. Design and Implement a Hash Table – Handling Collisions with Chaining or Linear Probing

  4. LRU Cache Implementation – Using Hash Map and Doubly Linked List

  5. Design a HashMap with Custom Hash Function – Handling Collisions Efficiently

  6. Find the Intersection of Two Arrays – Using Hash Sets

  7. Find Pair with Given Sum in an Array – Using Hash Map

  8. Count Distinct Elements in a Window – Using Hash Map

  9. Design a Randomized Set (Insert, Remove, Get Random) – Using Hash Map

  10. Count the Number of Subarrays with Given Sum – Using Hash Map with Prefix Sum

📌 Algorithms

  1. Sorting Algorithms

  2. Searching Algorithms

  3. Basic Recursion (Factorial, Fibonacci, Tower of Hanoi)

  4. 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

  1. Binary Trees & Binary Search Trees (BST)

  2. Heaps & Priority Queues (Min-Heap, Max-Heap, Heap Sort)

  3. Trie (Prefix Tree) (Used in Dictionary, Auto-complete)

  4. Graph Basics (Adjacency Matrix/List, BFS, DFS)

  5. Disjoint Set (Union-Find, Path Compression)

  6. Segment Trees & Fenwick Trees (Binary Indexed Tree - BIT)

📌 Algorithms

  1. Divide and Conquer (Merge Sort, Quick Sort, Exponentiation)

  2. Greedy Algorithms (Huffman Encoding, Activity Selection)

  3. Backtracking (N-Queens, Sudoku Solver, Subset Sum)

  4. Dynamic Programming (DP)

  5. Graph Algorithms


🔹 Advanced Level (High-Performance & Scalable DSA)

Master these for high-performance software and system design.

📌 Data Structures

  1. Advanced Trees

  2. Graph Data Structures

  3. Skip Lists (Used in Databases like Redis)

  4. Bloom Filters (Probabilistic Data Structure for Membership Testing)

📌 Algorithms

  1. Advanced Graph Algorithms

  2. Advanced Dynamic Programming

    • Matrix Chain Multiplication

    • DP with Bitmasking

    • DP on Trees

  3. String Algorithms

  4. Bit Manipulation

  5. Number Theory

    • Modular Exponentiation

    • Fermat’s Theorem

    • Chinese Remainder Theorem

  6. Approximation & Randomized Algorithms

    • Monte Carlo & Las Vegas Algorithms

    • Simulated Annealing

  7. Parallel & Distributed Algorithms (MapReduce, Paxos, Raft)


🎯 Final Thoughts


More from this blog

DSA মানে শুধু LeetCode না — DSA মানে Production System slow না করা

অনেকেই বলে — “ভাই, Web Development-এ DSA লাগে না” আসলে Junior Developer থাকলে এমনটাই মনে হয়।আমি নিজেও Junior থাকতে তাই ভাবতাম। আমার আবার একটা বাজে স্বভাব আছে 😅👉 কোন কিছুর বাস্তব প্রয়োজন না বুঝলে সেটা আমার মাথায় ঢুকে না। Junior থাকতে DSA শিখেছি...

Dec 24, 20253 min read
DSA মানে শুধু LeetCode না — DSA মানে Production System slow না করা

🦀 Rust-এ মেমরি ম্যানেজমেন্ট: GC ছাড়া In-depth.

Rust-এ Garbage Collector (GC) নেই, কিন্তু মেমরি নিরাপত্তা (memory safety) আর performance Rust-এর সবচেয়ে শক্তিশালী দিক।তাই, Go-এর মতো runtime-based GC না থাকা সত্ত্বেও Rust compile-time এ মেমরি ম্যানেজ করে Ownership System, Borrow Checker, আর Lifetime...

Oct 5, 202523 min read
🦀 Rust-এ মেমরি ম্যানেজমেন্ট: GC ছাড়া In-depth.

Morshedul Munna

45 posts

As a Software Developer, I am like an architect who designs and builds digital Products. I use my knowledge and expertise to create modern applications that are both efficient and elegant.