GATE CS 2021 Set 1 – Question 36
Consider the following recurrence relation:\(T(n) = T(n/2) + T(2n/5) + 7n\) for \(n > 0\), and \(T(0) = 0\).Which one of the following options is correct?
Subject-wise GATE questions
12 questions and papers
Consider the following recurrence relation:\(T(n) = T(n/2) + T(2n/5) + 7n\) for \(n > 0\), and \(T(0) = 0\).Which one of the following options is correct?
There are \(n\) unsorted arrays: \(A_1, A_2, \ldots, A_n\). Assume that \(n\) is odd. Each of \(A_1, A_2, \ldots, A_n\) contains \(n\) distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing…
Assume that multiplying a matrix \(G_1\) of dimension \(p \times q\) with another matrix \(G_2\) of dimension \(q \times r\) requires \(pqr\) scalar multiplications. Computing the product of \(n\) matrices \(G_1 G_2 G_3 \ldots G_n\) using dynamic programming, the time…
A message is made up entirely of characters from the set \(X = \{P, Q, R, S, T\}\). The table of probabilities for each of the characters is shown below.CharacterProbabilityP0.22Q0.34R0.17S0.19T0.08Total1.00If…
Let \(G\) be a complete undirected graph on 4 vertices, having 6 edges with weights being 1, 2, 3, 4, 5 and 6. The maximum possible weight that…
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on
An unordered list contains \(n\) distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is
Consider the following array of elements:<89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100>The minimum number of interchanges needed to convert it into a…
Suppose \(P\), \(Q\), \(R\), \(S\), \(T\) are sorted sequences having lengths 20, 24, 30, 35, 50 respectively. They are to be merged into a single sequence by merging…
Let \(W(n)\) and \(A(n)\) denote respectively the worst-case and average-case running time of an algorithm executed on an input of size \(n\). Which of the following is ALWAYS…
Every question here is free to read. A free account adds the verified key, the worked solution and your progress.