explanation

Reasoning-
The solution uses recursion to handle infinite-depth lookup within directories.

Time-Complexity-

Worst-Time-Complexity - O(6n+2)
Worst-Time-Complexity of order = 0(n)

Space Complexity -

Worst-Space-Complexity - O(2n)
Worst-Space-Complexity of order = 0(n)

Reasoning-
The solution uses:

Time-Complexity-

Worst-Time-Complexity - O(6n+2)
Worst-Time-Complexity of order = 0(n)

Space Complexity -

Worst-Space-Complexity - O(2n)
Worst-Space-Complexity of order = 0(n)

 
0
Kudos
 
0
Kudos

Now read this

being quiet in the world of loudmouths

it is amazing how much premium our society puts on being a chatterbox, having a good character is not good enough any more, you need to display it . being skilled is not that important, displaying it has more value in terms of societies... Continue →