Stacks on Data Structure and Algorithms related Questions and Answers - Page 1

Question 1 : What is the time complexity of an infix to postfix conversion algorithm?
1. O(N log N)
2. O(N)
3. O(N2)
4. O(M log N)
View Answer   Discuss with Members

Question 3 : Which of the following statement is incorrect with respect to balancing symbols algorithm?
1. {[()]}
2. ([ )]
3. {( )}
4. { [ ] }
View Answer   Discuss with Members

Question 4 : Out of the following operators (|, *, +, &, $), the one having lowest priority is ________
1. +
2. $
3. |
4. &
View Answer   Discuss with Members

Question 5 : What is the result of the given postfix expression? abc*+ where a=1, b=2, c=3.
1. 4
2. 5
3. 6
4. 7
View Answer   Discuss with Members

Question 7 : To convert the postfix expression into the infix expression we use stack and scan the postfix expression from left to right.
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 8 : While evaluating a prefix expression, the string is read from?
1. left to right
2. right to left
3. center to right
4. center to left to right
View Answer   Discuss with Members

Question 9 : Evaluate the following infix expression using algorithm and choose the correct answer. a+b*c-d/e^f where a=1, b=2, c=3, d=4, e=2, f=2.
1. 6
2. 8
3. 9
4. 7
View Answer   Discuss with Members

Question 10 : Which of these operators have the highest order of precedence?
1. '(' and ')'
2. '*' and '/'
3. '~' and '^'
4. '+' and '-'
View Answer   Discuss with Members


View 1 - 10 of 77 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter