( ( ) ( ( ) ) ( ( ) ) )
Input stack
( ( ) ( ( ) ) ( ( ) ) ) empty
( ) ( ( ) ) ( ( ) ) ) ( [Push]
) ( ( ) ) ( ( ) ) ) (( [Push]
( ( ) ) ( ( ) ) ) ( --> [pop as parenthesis match]
( ) ) ( ( ) ) ) (( [Push]
) ) ( ( ) ) ) ((( [Push]
) ( ( ) ) ) (( --> [pop as parenthesis match]
( ( ) ) ) ( --> [pop as parenthesis match]
( ) ) ) (( [Push]
) ) ) ((( [Push]
) ) (( [pop]
) ( [pop]
Empty Empty [pop]
Maximum 3 parenthesis appear at stack at one time