Previous Year Questions

Gate CSGate CS 2022 | Question - 15 | Algorithms

Consider the problem of reversing a singly linked list. To take an example, given the linked list below, the reversed linked list should look like Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in O(1) space?

Gate CSGate CS 2020 | Question - 2 | Algorithms

For parameters a and b, both of which are (1), T(n) = T(n1/a) + 1, and T(b) = 1. Then T(n) is

Gate CSGate CS 2020 | Question - 47 | Algorithms

Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is ________?

Gate CSGate CS 2020 | Question - 49 | Algorithms

Consider a graph G = (V, E), where V = {v1, v2,..., v100}, E = {(vi, vj) | 1 i j 100}, and weight of the edge (vi, vj)is |i-j|. The weight of minimum spanning tree of G is ______.