Compute the total size of a file or directory in a directory tree.
Unlock detailed company stats for this questionUpgrade
Given the root of a directory tree and a path to a specific file or directory, write an algorithm to compute the total size of that file or directory. Simple DFS problem; you are expected to run the code. AI may be used for compile errors, writing test cases, brainstorming and missed edge cases, but you own the core logic and cannot ask it to solve the question.
Format · LinkedIn coding-with-AI round.
Community answers
No answers contributed by the community yet.
Related questions
Compute the total travel of a lift that serves calls in order.Compute the total time for an orb starting on each tile of a corridor to escape.Related courses

Course

Course
Course
