Question Bank
Filter real, curated interview questions by topic, difficulty, and type. Open any question to practice and rate your confidence.
Filter by company and topic2 active
RecentMost viewed
16 questionsFree3Locked13
- Given an array of integers and a target, return the indices of the two numbers that add up to the target (Two Sum).
[Hash Map]BeginnerDsa· codingFreeReported frequent at Amazon+1 - Find the length of the longest substring without repeating characters.
[Sliding Window]IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Amazon+1 - Determine whether a string of brackets
()[]{}is valid (properly balanced).[Stack]BeginnerDsa· codingFreeReported frequent at Amazon - Count the number of islands in a 2D grid of land and water.
[BFS/DFS]IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Amazon+2 - Given a collection of intervals, merge all overlapping intervals.IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Amazon+3
- 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.IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Amazon
- Design and implement an LRU (Least Recently Used) cache in Python with O(1) get and put.IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Amazon
- Amazon OA: You must find, for each element in an array, the next greater element to its right in O(n) time. Which data structure enables this optimal solution?IntermediateDsa· multiple choice₹99 (Interview Prep or Pro plan required)
- Amazon OA: What is the worst-case time complexity of inserting n elements one by one into an initially empty binary min-heap using repeated push operations?IntermediateDsa· multiple choice₹99 (Interview Prep or Pro plan required)
- Amazon OA: Given a stream of integers, you need to support insert and 'find median' efficiently. Which structure gives O(log n) insert and O(1) median?AdvancedDsa· multiple choice₹99 (Interview Prep or Pro plan required)
- Amazon OA: To detect whether a singly linked list contains a cycle using O(1) extra space without modifying the list, which technique is standard?BeginnerDsa· multiple choiceFree
- Given an array and a window size k, return the maximum of every contiguous window of size k (Sliding Window Maximum).AdvancedDsa· coding₹99 (Interview Prep or Pro plan required)
- In a sorted array where every element appears exactly twice except one, find the single element in O(log n) time.IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)
- Given a string and a dictionary of words, return every way to insert spaces so the string becomes a sentence of dictionary words (Word Break II).AdvancedDsa· coding₹499 (Pro plan required)
- Merging two devices costs the sum of their sizes, and the merged device can be merged again. Find the minimum total cost to merge N devices into one (Connect N ropes with minimum cost).IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)
- Clone a linked list in which every node has a next pointer and a random pointer to any node (or null).IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)