Tag: recursion
Interview Questions
- The Josephus problem
- Enumerate every clear path across a blocked grid
- All ways to build a notional from lot sizes
- Enumerate every subset of a set of positions
- All orderings to execute a basket of trades
- Expand a wildcard ticker pattern into all matches
- Counting stair climbs without the exponential blow-up
- Tribonacci, three-way recursion but still linear
- Counting grid paths, top-down then bottom-up
- Binary strings with no two adjacent ones
- Fibonacci, from exponential to linear
- Generate all balanced bracket sequences
- Lowest common ancestor of two nodes
- Split positions across k equally-sized desks
- Trace a pattern through a grid of tiles
- Longest chain across a tree
- Best-value path anywhere in a decision tree
- Is this price-ordered tree a valid BST?
- What are the middle passenger's chances?
- The lost boarding pass
- Binary-splitting bacterium extinction
- Amoeba extinction probability
- Expected rolls of a die until the first six
- Expected flips of a biased coin until the first tail
- Expected draws until you pull an ace
- Expected quotes until your order fills
- Expected number of coin flips until the first head
- The die that explodes on a six
- Taking turns to flip the first head