Tesla interview question

20. Valid Parentheses 994. Rotting Oranges