Maximum Nesting Depth of the Parentheses

Solution Code

Time Complexity

O(N)

Space Complexity

O(1)