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 topic1 active
RecentMost viewed
45 questionsFree10Locked35
- 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).AdvancedAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Amazon
- Given a sorted array, find the k closest integers to a target x (x may not be in the array). Return them in ascending order.IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Google
- Given a sorted dictionary of an alien language (list of words in lexicographic order), derive the order of its characters (Alien Dictionary).AdvancedAlgorithms· coding₹499 (Pro plan required)Reported frequent at Airbnb+1
- 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).IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Apple
- Given a weighted graph, find the minimum-cost path from a source to a destination.IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Databricks
- House Robber: given an array of house values, maximize the sum you can rob without robbing two adjacent houses.IntermediateAlgorithms· codingFreeReported frequent at Databricks
- Count the number of connected components in an undirected graph (or islands in a grid), and discuss the incremental/streaming version.IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Databricks
- Given a large log/event stream, find the top K most frequent elements efficiently.IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Snowflake
- Maximum Points You Can Obtain from Cards: given an array
cardPointsand integerk, you take exactly k cards from either the beginning or the end each turn. Return the maximum total points obtainable.IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Uber - Given an array of words and a maximum line width L, format the text so that each line has exactly L characters and is fully (left and right) justified. Pack as many words per line as possible and distribute extra spaces as evenly as possible; the last line and any line with a single word are left-justified.AdvancedAlgorithms· coding₹499 (Pro plan required)Reported frequent at Airbnb
- Given a menu as a list of item prices and a target value K, find all possible combinations of items that sum to exactly K. (A variation of the classic combination-sum / N-sum problem asked in Airbnb's first round.)IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Airbnb
- Write a method to parse an input string in CSV format. Handle quoted fields that may contain commas and escaped double quotes (a doubled "" inside a quoted field represents a literal quote).IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Airbnb
- Given two strings s and t, determine if they are isomorphic - characters in s can be replaced to get t with a consistent one-to-one mapping (no two characters map to the same character). (LeetCode 205 - Isomorphic Strings)BeginnerAlgorithms· codingFreeReported frequent at LinkedIn
- Given a flowerbed as an array of 0s and 1s (0 = empty, 1 = planted) where no two flowers may be adjacent, determine if n new flowers can be planted without violating the no-adjacent rule. (LeetCode 605 - Can Place Flowers)BeginnerAlgorithms· codingFreeReported frequent at LinkedIn
- Given exchange rates as a string like "USD:CAD:1.2,CAD:GBP:0.6,USD:AUD:1.4", write a function that converts an amount from a source to a target currency, including multi-step paths (USD to GBP via CAD). Then extend it to return the best achievable rate when several paths exist, and handle rates that form an arbitrage cycle.IntermediateAlgorithms· coding₹499 (Pro plan required)Reported frequent at Stripe
- Implement a retry helper that calls a flaky function (e.g. a payment or API call) and retries on failure using exponential backoff with jitter, a maximum number of attempts, and a maximum delay cap. Only retry on transient/retryable errors.IntermediateAlgorithms· coding₹99 (Interview Prep or Pro plan required)Reported frequent at Stripe
- Amazon OA: A recursive function computes Fibonacci as fib(n)=fib(n-1)+fib(n-2) with no memoization. What is its time complexity?BeginnerAlgorithms· multiple choiceFree
- Google OA: What is the time complexity of finding the k-th smallest element in an unsorted array of n elements using the Quickselect algorithm, on average?IntermediateAlgorithms· multiple choice₹99 (Interview Prep or Pro plan required)
- Google OA: Which algorithm correctly finds shortest paths from a single source in a graph that contains negative edge weights but no negative cycles?IntermediateAlgorithms· multiple choice₹99 (Interview Prep or Pro plan required)
- Microsoft OA: What is the time complexity of the standard dynamic-programming solution to the 0/1 Knapsack problem with n items and capacity W?IntermediateAlgorithms· multiple choice₹99 (Interview Prep or Pro plan required)
- Meta OA: What is the time complexity of computing whether two strings are anagrams by counting character frequencies, for strings of length n over a fixed alphabet?BeginnerAlgorithms· multiple choiceFree
- Meta OA: In graph terms, finding the minimum number of edges between two nodes in an unweighted graph is best done with which algorithm?BeginnerAlgorithms· multiple choiceFree
- Meta OA: For the problem 'given n intervals, find the minimum number of meeting rooms required', which approach is optimal?AdvancedAlgorithms· multiple choice₹99 (Interview Prep or Pro plan required)
- Which technique solves "best value under a running constraint" problems such as 0/1 knapsack by storing answers to overlapping subproblems, and which two properties make a problem suitable for it?IntermediateAlgorithms· multiple choice₹99 (Interview Prep or Pro plan required)
Page 1 / 2