Winter SalePremium questions, over 25% offUnlock all premium questions for over 25% off
Daily Branch Pruning
Medium
A file system manages a directory tree. Each day, all leaf directories (those with no child directories) are simultaneously removed. Directories that become leaves only after their children are removed will be removed the following day. This process repeats until the entire tree is empty.
You are given the tree as two arrays of length n:
...
More Google interview questions
- Frequency Merge Treemedium
- Dual Extremes Queuehard
- Longest Match Tokenizermedium
- [CodeSignal] Maximum Zero-Sum Tripletsmedium
- Connected Crop Allocationmedium
- [CodeSignal] Coin Table Gameeasy
- Running Tests With Failing Pairsmedium
- Unpainted Segmentsmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.