Pergunta de entrevista da empresa Amazon

Parenthesis Question based on stacks concept Finding an element in a sorted 2D array