Skip to main content
Datainteg
Career OS
Roadmaps
Practice
Resources
Community
Blog
Pricing
About
Login
Start Free
DSA Round Interview Questions · Datainteg · Datainteg Career OS
Interview Prep
Rounds
DSA Round
DSA Round Interview Questions
Data structures and algorithms round with problem-solving under constraints.
36 questions
Open in question bank
DSA Round questions
Given a 2D grid of '1's (land) and '0's (water), count the number of islands.
Intermediate
· coding
premium
In a grid, cells are empty (0), fresh orange (1), or rotten (2). Each minute a rotten orange rots its 4-directional neighbours. Return the minimum minutes until no fresh orange remains, or -1 if impossible.
Intermediate
· coding
premium
Design and implement an LRU (Least Recently Used) cache supporting get and put in O(1).
Advanced
· coding
premium
There are numCourses labeled 0..n-1 with prerequisite pairs. Return an ordering in which you can finish all courses, or empty if impossible (Course Schedule II).
Advanced
· coding
premium
Given a sorted dictionary of an alien language (list of words in lexicographic order), derive the order of its characters (Alien Dictionary).
Advanced
· coding
premium
Given an m x n integer matrix, return the length of the longest strictly increasing path (moves are 4-directional).
Advanced
· coding
premium
Given an m x n board of characters and a list of words, return all words that can be formed by sequentially adjacent cells (Word Search II).
Advanced
· coding
premium
Given two strings word1 and word2, return the minimum number of insert, delete, or replace operations to convert word1 into word2 (Edit Distance).
Advanced
· coding
premium
Given a reference to a node in a connected undirected graph, return a deep copy (clone) of the graph.
Intermediate
· coding
premium
Design an algorithm to serialize a binary tree to a string and deserialize it back.
Advanced
· coding
premium
Find the lowest common ancestor (LCA) of two given nodes in a binary tree.
Intermediate
· coding
premium
Given n non-negative bar heights, compute how much rainwater can be trapped between them (Trapping Rain Water).
Advanced
· coding
premium
Given the root of a binary tree, return its vertical order traversal (nodes grouped by column, left to right; top to bottom within a column).
Intermediate
· coding
premium
Find the lowest common ancestor of two nodes in a binary tree.
Intermediate
· coding
premium
Find the kth largest element in an unsorted array.
Intermediate
· coding
premium
Given the root of a binary tree, return the length of its diameter (the longest path between any two nodes, measured in edges).
Intermediate
· coding
premium
Return the vertical order traversal of a binary tree (nodes grouped by column index, top-to-bottom, left-to-right).
Intermediate
· coding
premium
Given a 2D grid of '1' (land) and '0' (water), count the number of islands (connected components of land).
Intermediate
· coding
premium
Given a string and a dictionary of words, determine whether the string can be segmented into a space-separated sequence of dictionary words (Word Break).
Intermediate
· coding
premium
Find the kth largest element in an unsorted array.
Intermediate
· coding
premium
Given a weighted graph, find the minimum-cost path from a source to a destination.
Intermediate
· coding
premium
House Robber: given an array of house values, maximize the sum you can rob without robbing two adjacent houses.
Intermediate
· coding
premium
Given a board of characters and a list of words, return all words that can be formed by sequentially adjacent cells (Word Search II).
Advanced
· coding
premium
Count the number of connected components in an undirected graph (or islands in a grid), and discuss the incremental/streaming version.
Intermediate
· coding
premium
Clone Graph: given a reference to a node in a connected undirected graph, return a deep copy (clone) of the graph. Each node contains a value and a list of neighbors.
Intermediate
· coding
premium
Merge Intervals: given an array of intervals where intervals[i] = [start, end], merge all overlapping intervals and return the non-overlapping intervals covering all the input.
Intermediate
· coding
premium
Cheapest Flights Within K Stops: given n cities, a list of flights [from, to, price], a src, dst, and k, find the cheapest price from src to dst with at most k stops, or -1 if none exists.
Advanced
· coding
premium
Design an LRU (Least Recently Used) Cache supporting get(key) and put(key, value) both in O(1) average time, evicting the least-recently-used entry when capacity is exceeded.
Advanced
· coding
premium
Given a flight itinerary as a list of [from, to, price] edges, along with a source, destination, and a maximum of K stops allowed, find the cheapest price to get from source to destination within at most K stops. Return -1 if unreachable.
Intermediate
· coding
premium
Implement an iterator over an array of arrays (a nested list) that supports hasNext(), next(), and remove(). remove() deletes the last element returned by next() and may be called at most once per next() call, otherwise it throws.
Intermediate
· coding
premium
Browse all 36 DSA Round questions