DSA Interview Sheets & Practice Engine

Top 30 Curated

Curated 30+ high-frequency coding interview problems with optimal approaches, complexities, and code solutions.

Overall Progress0%
0/ 10 Solved
Easy Category
0/ 7 Solved

Foundation arrays, strings & pointers

Medium Category
0/ 3 Solved

Target frequency in FAANG & MNC rounds

Pattern Mastery

Core problem-solving templates

Showing 10 ProblemsClick a problem to reveal optimal intuition & code
Two SumEasyHash Map Lookup

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution.

Best Time to Buy and Sell StockEasySliding Window / Greedy

You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve.

Valid PalindromeEasyTwo Pointers (Converging)

A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward.

Longest Substring Without Repeating CharactersMediumDynamic Sliding Window

Given a string s, find the length of the longest substring without duplicate characters.

Container With Most WaterMediumTwo Pointers (Greedy Inward)

Find two lines that together with the x-axis form a container, such that the container contains the most water.

Valid ParenthesesEasyMatching Stack

Given a string containing just the characters "(", ")", "{", "}", "[" and "]", determine if the input string is valid.

Reverse Linked ListEasyPointer In-Place Reversal

Given the head of a singly linked list, reverse the list, and return the reversed list.

Invert Binary TreeEasyTree DFS (Post-order / Swap)

Given the root of a binary tree, invert the tree, and return its root.

Number of IslandsMediumGrid Graph BFS/DFS

Given an m x n 2D binary grid grid which represents a map of "1"s (land) and "0"s (water), return the number of islands.

Climbing StairsEasy1D Tabulation / Fibonacci

You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?