महा Abhyas Computer Science and Infirmation Technology Data Structure
महा Abhyas Computer Science and Infirmation Technology Data Structure
Data Structure
4 Heap
5 Graph
(GATE 2023)
QUESTION- 01
A 3 8 5 13 11 10 B 3 5 8 10 11 13 C 3 8 16 13 24 50 D 3 16 8 50 24 13
(GATE 2023)
QUESTION- 03
QUESTION- 04
(GATE 2023)
QUESTION-
Question 05
: NAT
Suppose the stack S support the operation of push
pop and Reverse. Reverse operation reverse the entire
content of stack. Similarly Queue support the
operation of Enqueue , dequeue and reverse( reverse
entire content of the queue. In addition to that it also
support the operation of isEmpty() for stack and
queue which returns true if stack or queue is empty.
A The best algorithm for the problem takes (n) time in the worst case.
B The best algorithm for the problem takes (n log n) time in the worst case
C The best algorithm for the problem takes (n2 ) time in the worst case.
if (n = =0 ) return; if (n = = 0) return ;
} }
QUESTION- 12
(GATE 2020)
(C) fun2(4) is 4 5 3 1 2
If the list contain the value 1→2→3 then what What is the output of the following function
is the Output following function.
(A)3321332
void fun (struct node *ptr){
(B)3323321332332
if (ptr){
fun (ptr -> link); (C) 33233213323321
printf ("%d", ptr ->data); (D)NULL pointer dereferencing
fun (ptr->link);
printf("%d", ptr->data);
}
return;
}
QUESTION- 14