The advanced challenge is implementing your algorithm with O(1) space complexity.
My S(1) algorithm is converting the iterative algorithm (stack) to recursive algorithm.
The recursive one transfers to memory overhead to function call stack though it seemingly cuts the extra space in the function.
So I solve this problem with a trivial S(n) = O(n) algorithm.
Problem234
Directory actions
More options
Directory actions
More options
Problem234
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||