Question Bank
Every question, one list
Sandboxed coding rounds that run against a hidden test suite, and written questions graded against a rubric — side by side, because when you are drilling a topic you want both.
Topicimplementation (105)system-design (24)hld (20)trees (11)distributed-systems (10)arrays-hashing (9)concurrency (9)graphs (9)binary-search (8)consistency (8)dp-1d (8)linked-list (8)reliability (8)storage (8)
Clear filters7 questions · browse by bank instead
- Coin ChangeWrite `coin_change(coins, amount)` returning the fewest coins summing to the amount, or `-1` if impossible. Coins may be reused freely. coin_change([1,2,5], 11) -> 3 (5 + 5 + 1) Greedy — alwmediumCoderpad#dp-1d#implementation
- House RobberWrite `rob(nums)` returning the largest sum obtainable from a list with no two chosen elements adjacent. rob([2,7,9,3,1]) -> 12 (2 + 9 + 1) At each house you either take it and add the best mediumCoderpad#dp-1d#implementation
- House Robber IIWrite `rob_circular(nums)` with the same rule as House Robber, except the first and last houses are adjacent. rob_circular([2,3,2]) -> 3 (cannot take both 2s) The circle only forbids one commediumCoderpad#dp-1d#implementation
- Longest Increasing SubsequenceWrite `length_of_lis(nums)` returning the length of the longest strictly increasing subsequence. Elements need not be contiguous. length_of_lis([10,9,2,5,3,7,101,18]) -> 4 (2,3,7,101) The O(mediumCoderpad#dp-1d#implementation
- Longest Palindromic SubstringWrite `longest_palindrome(s)` returning the longest palindromic substring. Any one will do if several tie. longest_palindrome("babad") -> "bab" or "aba" longest_palindrome("cbbd") -> "bbmediumCoderpad#dp-1d#implementation
- Maximum Product SubarrayWrite `max_product(nums)` returning the largest product of any contiguous non-empty subarray. max_product([2,3,-2,4]) -> 6 max_product([-2,0,-1]) -> 0 Kadane on sums does not transfermediumCoderpad#dp-1d#implementation
- Word BreakWrite `word_break(s, word_dict)` returning `True` when the string can be split into a sequence of dictionary words. Words may be reused. word_break("leetcode", ["leet","code"]) -> True Greedy mediumCoderpad#dp-1d#implementation