DSA Interview Sheets & Practice Engine
Top 30 CuratedCurated 30+ high-frequency coding interview problems with optimal approaches, complexities, and code solutions.
Foundation arrays, strings & pointers
Target frequency in FAANG & MNC rounds
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.
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.
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.
Given a string s, find the length of the longest substring without duplicate characters.
Find two lines that together with the x-axis form a container, such that the container contains the most water.
Given a string containing just the characters "(", ")", "{", "}", "[" and "]", determine if the input string is valid.
Given the head of a singly linked list, reverse the list, and return the reversed list.
Given the root of a binary tree, invert the tree, and return its root.
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.