Related Algorithms PYQs
Match the algorithms with their time complexities: Algorithm: (P) Towers of Hanoi with n disks (Q) Binary search given n sorted nu…
The Breadth First Search (BFS) algorithm has been implemented using the queue data structure. Which one of the following is a poss…
Consider the recurrence function T(n) = 2T(√n) + 1 for n > 2, and T(n) = 2 for 0 < n <= 2. Then T(n) in terms of Θ notation is
Consider the following C function: ```c int fun(int n) { int i, j; for (i = 1; i <= n; i++) { for (j = 1; j < n; j…
Consider the following recurrence relations: for all n > 1, T1(n) = 4*T1(n/2) + T2(n), and T2(n) = 5*T2(n/4) + \(\Theta(\log_2 n)\…
Let G(V,E) be an undirected, edge-weighted graph with integer weights. The weight of a path is the sum of the weights of the edges…
Free account benefits
Turn practice into measurable progress
Public PYQs and reference pages stay free. Sign in when you want GATEverse to remember what you studied and guide what to practise next.