You start at the main folder. Given an array of operations: '../' moves to parent (stays if at main), './' stays in current, 'x/' moves to child folder named x. Return the minimum number of operations to go back to the main folder.
minOperations(["d1/","d2/","../","d21/","./"]) => 2
Waiting for you...
CodeBot will comment on your code as you write...
Click "Run Code" or press Ctrl+Enter to test your solution