s is a valid string of parentheses mixed with other characters (every ( has a matching )). Return the maximum nesting depth: the largest number of ( that are open at the same time.
Example 1
Input:
max_nesting_depth('(1+(2*3)+((8)/4))+1')
Output:
3
Example 2
Input:
max_nesting_depth('abc')
Output:
0
0 <= len(s) <= 3 * 10**5s are balanced and correctly ordered.No results yet
Run your code to check it against the examples, or submit to run every test.