Daily Branch Pruning
Google interview questions · Medium · Coding round · 6 tests
A directory tree is pruned one day at a time. On each day, every current leaf directory is removed simultaneously. Directories that become leaves only after that removal must wait until the next day.
Run your code with Ctrl+Enter to see results.