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…
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…
A message is made up of characters from X = {P, Q, R, S, T} with probabilities: P: 0.22, Q: 0.34, R: 0.17, S: 0.19, T: 0.08. If a …
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.