Pregunta de entrevista de Amazon

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