Time Left - 12:00 mins
GATE CS 2019 : Prog & DS Rapid Quiz -3
Attempt now to get your rank among 823 students!
Question 1
Consider a sorted circular doubly-linked list where the head element points to the smallest element in the list, so what is the complexity in terms of Big-Oh for determining the median element in this doubly-linked list?
Question 2
What will be the postfix equivalent of the following infix expression:
Question 3
Consider an undirected Graph A having b number of vertices and c number of edges. This graph is represented by adjacency list. In terms of Big-Oh what will be the time complexity of printing all the elements which are connected in this graph?
Question 4
Initially a priority queue had 5 elements and it is being implemented as Max-Heap. Let’s say the level order traversal of the heap is: 30, 18, 17, 12, 11. Now two more elements are inserted into the heap i.e. 10 and 19 in the same order. The level order traversal of the heap after the insertion is:
Question 5
The following function test takes argument a queue and uses stack to perform some function:
void test(Queue *A)
{
Stack T;
while (!isEmpty(A))
push(&T, deQueue(A));
while (!isEmpty(&T))
enQueue(A, pop(&T));
}
What does the function test do?
void test(Queue *A)
{
Stack T;
while (!isEmpty(A))
push(&T, deQueue(A));
while (!isEmpty(&T))
enQueue(A, pop(&T));
}
What does the function test do?
Question 6
Suppose you want to build an address book with entries in alphabetical order by last name, which of the following abstract data type is most appropriate for the problem?
- 823 attempts
- 1 upvote
- 9 comments
Mar 24GATE & PSU CS