Abstract Data Types on Data Structure and Algorithms related Questions and Answers - Page 2

Question 11 : The prefix form of an infix expression p + q – r * t is?

1. + pq – *rt
2. – +pqr * t
3. – +pq * rt
4. – + * pqrt
View Answer   Discuss with Members

Question 12 : In a stack, if a user tries to remove an element from empty stack it is called _________

1. Underflow
2. Empty collection
3. Overflow
4. Garbage Collection
View Answer   Discuss with Members

Question 13 : What would be the asymptotic time complexity to find an element in the linked list?

1. O(1)
2. O(n)
3. O(n2)
4. None of the mentioned
View Answer   Discuss with Members

Question 15 : Assume that the operators +,-, X are left associative and ^ is right associative.
The order of precedence (from highest to lowest) is ^, X, +, -. The postfix expression for the infix expression a + b X c – d ^ e ^ f is

1. abc X+ def ^^ –
2. abc X+ de^f^ –
3. ab+c Xd – e ^f^
4. -+aXbc^ ^def
View Answer   Discuss with Members

Question 17 : Consider yourself to be in a planet where the computational power of chips to be slow. You have an array of size 10.You want to perform enqueue some element into this array. But you can perform only push and pop operations .Push and pop operation both take 1 sec respectively. The total time required to perform enQueue operation is?

1. 20
2. 40
3. 42
4. 43
View Answer   Discuss with Members

Question 18 : The essential condition which is checked before deletion in a linked queue is?

1. Underflow
2. Overflow
3. Front value
4. Rear value
View Answer   Discuss with Members

Question 19 : What is the time complexity of pop() operation when the stack is implemented using an array?

1. O(1)
2. O(n)
3. O(logn)
4. O(nlogn)
View Answer   Discuss with Members

Question 20 : Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the number of elements present in stack are

1. 1
2. 2
3. 3
4. 4
View Answer   Discuss with Members


View 11 - 20 of 128 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