Facebook Pixel

Namaste DSA Guides

Master Data Structures and Algorithms with in-depth practical guides.

Topics Covered

Guide 1

How to Reverse a Linked List

A step-by-step guide on how to safely reverse a singly linked list using three pointers.

Read Guide
Guide 2

How to Implement Binary Search

Learn how to write an O(log N) binary search algorithm to instantly find elements in a sorted array.

Read Guide
Guide 3

How to Traverse a Graph using DFS

How to implement Depth First Search to explore deeply into graph networks.

Read Guide
Guide 4

How to Detect a Cycle in a Linked List (Floyd's Algorithm)

A step-by-step guide on how to detect a cycle in a linked list using Floyd's two-pointer Tortoise and Hare algorithm.

Read Guide
Guide 5

How to Implement a Least Recently Used (LRU) Cache

A step-by-step guide on how to build an LRU Cache using a Hash Map and a Doubly Linked List to achieve constant time operations.

Read Guide
Guide 6

How to Find the Shortest Path in an Unweighted Graph (BFS)

A step-by-step guide on how to use Breadth First Search to find the shortest path between two nodes in an unweighted graph.

Read Guide
Guide 7

How to Balance a Binary Search Tree (AVL Trees)

A step-by-step guide on how AVL Trees self-balance after every insertion and deletion using height tracking and rotations.

Read Guide
Guide 8

How to Solve the Knapsack Problem using Dynamic Programming

A step-by-step guide on how to solve the 0/1 Knapsack Problem by building a bottom-up Dynamic Programming table.

Read Guide
Guide 9

How to Implement a Priority Queue using a Min-Heap

A step-by-step guide on how to build a Priority Queue backed by a Min-Heap stored as an array with efficient insert and extract operations.

Read Guide
Guide 10

How to Perform Topological Sorting on a Directed Acyclic Graph

A step-by-step guide on how to perform topological sorting using Kahn's Algorithm with In-Degree tracking and a Queue.

Read Guide
Guide 11

How to Implement Binary Search Tree Insertion and Deletion

A step-by-step guide on how to correctly insert and delete nodes in a Binary Search Tree while maintaining its ordering property.

Read Guide
Guide 12

How to Implement Merge Sort

A step-by-step guide on how to implement the Merge Sort algorithm using the divide and conquer strategy to sort an array in O(N log N) time.

Read Guide
Guide 13

How to Implement Quick Sort

A step-by-step guide on how to implement Quick Sort using pivot selection and the partition technique to sort arrays efficiently.

Read Guide
Guide 14

How to Implement a Stack using Arrays and Linked Lists

A step-by-step guide on how to build a Stack data structure from scratch using both an Array and a Linked List approach.

Read Guide
Guide 15

How to Implement a Queue using Stacks

A step-by-step guide on how to simulate Queue behavior using two Stacks to achieve efficient enqueue and dequeue operations.

Read Guide
Guide 16

How to Find All Subsets of an Array (Power Set)

A step-by-step guide on how to generate all possible subsets of an array using both the recursive backtracking approach and the iterative bit manipulation approach.

Read Guide
Guide 17

How to Solve Two Sum and Its Variations

A step-by-step guide on how to solve the Two Sum problem and its common variations using Hash Maps and the Two Pointer technique.

Read Guide
Guide 18

How to Implement a Trie Data Structure

A step-by-step guide on how to build a Trie for efficient string storage, prefix searching, and autocomplete functionality.

Read Guide
Guide 19

How to Find the Lowest Common Ancestor in a Binary Tree

A step-by-step guide on how to find the Lowest Common Ancestor of two nodes in a Binary Tree using recursive depth first traversal.

Read Guide
Guide 20

How to Implement the Sliding Window Technique

A step-by-step guide on how to use the Sliding Window technique to solve subarray and substring problems efficiently in linear time.

Read Guide
Guide 21

How to Solve Problems using Dynamic Programming on Strings

A step-by-step guide on how to approach and solve classic string DP problems like Longest Common Subsequence and Edit Distance.

Read Guide
Guide 22

How to Traverse a Binary Tree (All Four Ways)

A step-by-step guide on how to perform Inorder, Preorder, Postorder, and Level Order traversal on a Binary Tree.

Read Guide
Guide 23

How to Detect and Remove Duplicates in an Array

A step-by-step guide on how to detect and remove duplicate elements from an array using Hash Sets, Sorting, and Two Pointers.

Read Guide
Guide 24

How to Find the Kth Largest Element in an Array

A step-by-step guide on how to find the Kth largest element efficiently using sorting, Min-Heap, and the QuickSelect algorithm.

Read Guide
Please Login.
Please Login.