Use stack to push '(" initially. if ')' is found remove its pair
'('.finally if the stack is empty then the expression is correct!

On Jun 10, 9:45 pm, jalaj jaiswal <jalaj.jaiswa...@gmail.com> wrote:
> give an algo which reads an  paranthesised infix expression and check
> well-formdness of paranthesis..
>
> eg .. ))a+b((   and (a+b))  ...are not well formed parantheses exp
>
> --
> With Regards,
> Jalaj Jaiswal
> +919026283397
> B.TECH IT
> IIIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to