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
16 questionsFree3Locked13
- 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