Data Structures and Algorithms
Core coding and algorithmic interview questions organized from foundational patterns to advanced problem solving.
Frequently Asked DSA Questions
Find two numbers in an array that add up to a specific target sum.
Find the contiguous subarray with the largest sum (Kadane's Algorithm).
MediumPractice on LeetCodeReverse a singly linked list iteratively and recursively.
Determine whether an expression of parentheses and brackets is balanced.
Detect whether a singly linked list contains a cycle.
Find the maximum profit achievable from buying and selling a stock once.
Count the number of connected islands in a 2D binary grid.
MediumPractice on LeetCodeFind the majority element appearing more than n/2 times in an array.
MediumPractice on GFG
Basic Coding Questions
Check whether a given string is a valid palindrome.
Check if two strings are anagrams of each other.
Find the missing number in a permutation range from 1 to N.
EasyPractice on GFGImplement binary search on a sorted array.
Intermediate Coding Questions
Search for a target value in a rotated sorted array.
MediumPractice on LeetCodeMerge all overlapping intervals in a collection.
MediumPractice on LeetCodePerform level-order traversal of a binary tree.
MediumPractice on LeetCodeDesign and implement a Least Recently Used (LRU) Cache.
MediumPractice on LeetCodeFind the lowest common ancestor of two nodes in a binary tree.
MediumPractice on LeetCodeDetermine if all courses can be finished given prerequisite pairs (cycle detection / topological sort).
MediumPractice on LeetCodeFind the length of the longest substring without repeating characters.
MediumPractice on LeetCodeFind the kth smallest element in a Binary Search Tree.
MediumPractice on LeetCode
Advanced Coding Questions
Compute how much rainwater can be trapped between elevation bars.
Solve the N-Queens placement problem on an N x N chessboard.
Compute the minimum edit distance between two strings.
MediumPractice on LeetCodeMerge k sorted linked lists into a single sorted list.
Find the median from a continuous stream of integers.
Find the shortest paths from a source vertex using Dijkstra's algorithm.
MediumPractice on GFG