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 filters5 questions · browse by bank instead
- Binary Tree Level Order TraversalWrite `level_order(root)` returning a list of lists, one per level, top to bottom and left to right. [3,9,20,null,null,15,7] -> [[3], [9, 20], [15, 7]] A plain BFS visits nodes in the right ormediumCoderpad#implementation#trees
- Binary Tree Right Side ViewWrite `right_side_view(root)` returning the values visible when looking at the tree from the right, top to bottom. [1,2,3,null,5,null,4] -> [1, 3, 4] Walking down the right spine is the obvioumediumCoderpad#implementation#trees
- Kth Smallest Element in a BSTWrite `kth_smallest(root, k)` returning the kth smallest value (1-indexed) in the BST. An in-order traversal of a BST visits values in ascending order, so this is "stop after k visits." Collecting evmediumCoderpad#implementation#trees
- Lowest Common Ancestor of a BSTWrite `lowest_common_ancestor(root, p, q)` returning the deepest node that is an ancestor of both. Nodes are node objects, both present in the tree, and a node counts as its own ancestor. In a generamediumCoderpad#implementation#trees
- Validate Binary Search TreeWrite `is_valid_bst(root)` returning `True` when every node in the left subtree is strictly less than the node, and every node in the right subtree is strictly greater — for *all* nodes, not just immemediumCoderpad#implementation#trees