Call Support +91-85588-96644
TCYonline

Login

Sign Up

Please enter a Username or Email ID
Please enter a password
Keep me logged in
Please enter your name
Please enter your mobile number
You can't leave Captcha Code empty
By submitting this form, you agree to the Terms & Privacy Policy.
OR

Sign Up via Facebook

Sign Up via Google

Sign Up via Twitter

Download Software
Tests given

Download TCY App

App Image

The best data structure to check whether an arithmetic expression has balanced parentheses is a

 
queue
stack
tree
list

Reply


Please type your answer before submitting.
Submit

Tree

Tree

Tree

Because stack follows last in first out. So in the equation, the braces which appear immediately before(last in) the enclosed expression, the closing brace of same type should follow the expression immediately(first out). If this isn't present, the equation has unbalanced braces/parentheses.

Stack