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 filters4 questions · browse by bank instead
- Diameter of Binary TreeWrite `diameter_of_binary_tree(root)` returning the number of edges on the longest path between any two nodes. The path need not pass through the root. [1,2,3,4,5] -> 3 (4 -> 2 -> 1 -> 3) TheasyCoderpad#implementation#trees
- Invert Binary TreeWrite `invert_tree(root)` swapping every left and right child, and returning the root. The code is four lines. What the interviewer is listening for is whether you can name what you are doing — this easyCoderpad#implementation#trees
- Maximum Depth of Binary TreeWrite `max_depth(root)` returning the number of nodes on the longest path from the root down to a leaf. An empty tree has depth 0. The recursive answer is one line. The reason this is asked at all iseasyCoderpad#implementation#trees
- Subtree of Another TreeWrite `is_subtree(root, sub)` returning `True` when `sub` appears as a subtree of `root` — matching a node and *all* of its descendants exactly. This is two problems: an exact same-tree comparison, aeasyCoderpad#implementation#trees