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

Question 71 : What is the time complexity of inserting at the end in dynamic arrays?

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

Question 73 : If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?

1. ABCD
2. DCBA
3. DCAB
4. ABDC
View Answer   Discuss with Members

Question 74 : What is the term for inserting into a full queue known as?

1. overflow
2. underflow
3. null pointer exception
4. all of the mentioned
View Answer   Discuss with Members

Question 75 : What is the space complexity for deleting a linked list?

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

Question 76 : Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order).
The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?

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

Question 77 : In Breadth First Search of Graph, which of the following data structure is used?

1. Stack
2. Queue
3. Linked list
4. None of the mentioned
View Answer   Discuss with Members

Question 79 : Convert the following Infix expression to Postfix form using a stack
x + y * z + (p * q + r) * s, Follow usual precedence rule and assume that the expression is legal.

1. xyz*+pq*r+s*+
2. xyz*+pq*r+s+*
3. xyz+*pq*r+s*+
4. None of the mentioned
View Answer   Discuss with Members


View 71 - 80 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