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

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

Question 42 : Express -15 as a 6-bit signed binary number.
1. 001111
2. 101111
3. 101110
4. 001110
View Answer   Discuss with Members

Question 43 : Operations required for reversing a word or a string using stack are push() and pop().
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 44 : Evaluate and write the result for the following postfix expression
abc*+de*f+g*+ where a=1, b=2, c=3, d=4, e=5, f=6, g=2.
1. 61
2. 59
3. 60
4. 55
View Answer   Discuss with Members

Question 45 : What is the number of moves required in the Tower of Hanoi problem for k disks?
1. 2k – 1
2. 2k + 1
3. 2k + 1
4. 2k – 1
View Answer   Discuss with Members

Question 46 : How many stacks are required for reversing a word algorithm?
1. one
2. two
3. three
4. four
View Answer   Discuss with Members

Question 47 : Which of the following data structure is used to convert postfix expression to infix expression?
1. Stack
2. Queue
3. Linked List
4. Heap
View Answer   Discuss with Members

Question 48 : Find the output of the following prefix expression
*+2-2 1/-4 2+-5 3 1
1. 2
2. 12
3. 10
4. 4
View Answer   Discuss with Members

Question 49 : An error is reported when the stack is not empty at the end.
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 50 : Consider the stack
| 5 |
| 4 |
| 3 |
| 2 |.
At this point, '*' is encountered. What has to be done?
1. 5*4=20 is pushed into the stack
2. * is pushed into the stack
3. 2*3=6 is pushed into the stack
4. * is ignored
View Answer   Discuss with Members


View 41 - 50 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