Web Page

Searching, Sorting, Hashing, Asymptotic worst case time and Space complexity, Algorithm design techniques: Greedy, Dynamic programming, and Divide‐and‐conquer, Graph search, Minimum spanning trees, Shortest paths.

$$\scriptsize{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}\hline \textbf{Year}& \textbf{2026 - 1}& \textbf{2026 - 2}& \textbf{2025 - 1}& \textbf{2025 - 2}& \textbf{2024 - 1}& \textbf{2024 - 2}& \textbf{2023}& \textbf{2022}& \textbf{2021 - 1}& \textbf{2021 - 2}&\textbf{Minimum}&\textbf{Average}&\textbf{Maximum}\\\hline \textbf{1 Mark Count}&4&4&2&2&1&2&2&2&3&2&1&2.4&4\\\hline \textbf{2 Marks Count}&6&4&3&3&4&2&2&2&3&4&2&3.3&6\\\hline \textbf{Total Marks}&16&12&8&8&9&6&6&6&9&10&\bf{6}&\bf{9}&\bf{16}\\\hline \end{array}}}$$

3 3 votes
1 1 answer
157
157 views
2 2 votes
1 1 answer
132
132 views
For $T(n,n)$, consider:$T(x,c) = \Theta(x)$ for $c \leq 2$$T(x,y) = \Theta(x) + S(x,y/2)$$S(c,y) = \Theta(y)$ for $c \leq 2$$S(x,y) = \Theta(y) + T(x/2,y)$What is the asy...
2 2 votes
1 1 answer
117
117 views
For $T(n,n)$, consider:$T(x,c) = \Theta(x)$ for $c \leq 2$$T(c,y) = \Theta(y)$ for $c \leq 2$$T(x,y) = \Theta(x) + T(x,y/2)$ What is the asymptotic complexity of $T(n,n)$...
2 2 votes
1 1 answer
132
132 views
For $T(n,n)$, consider:$T(x,c) = \Theta(x)$ for $c \leq 2$$T(c,y) = \Theta(y)$ for $c \leq 2$$T(x,y) = \Theta(x+y) + T(x/2,y/2)$What is the asymptotic complexity of $T(n,...
0 0 votes
1 1 answer
152
152 views
Given the following recursive Python function :def fun(n): if n <= 1: return n else: return fun(n - 1) + fun(n - 2)What is the time complexity of $\texttt{fun(n)}$?$O(n)$...
4 4 votes
1 1 answer
137
137 views
Consider the following recursive C function:int fun(int n) { if (n <= 1) { return n; } else { return fun(n - 1) + fun(n - 2); } }What is the time complexity of $\texttt{f...
1 1 vote
1 1 answer
145
145 views
Consider the following C code:int total = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { for (int k = 0; k < n; k++) { total += i * j * k; } } }What is th...
0 0 votes
1 1 answer
80
80 views
Given the following recursive Python functiondef complex_loops(n): total = 0 for i in range(n): for j in range(n): for k in range(n): total += i * j * k return totalWhat ...
2 2 votes
1 1 answer
120
120 views
Suppose $f(n) \in \Omega(n^2)$.Classify the following statements:$\text{S1}$. $f(n) \in \Omega(n^3)$ $\text{S2}$. $f(n) \in \Omega(n)$ $\text{S3}$. $f(n) \in O(n)$ $\text...
3 3 votes
1 1 answer
129
129 views
Arrange the following functions in increasing order of asymptotic growth:$f_1(n) = n^{\sqrt n}$$f_2(n) = 2^n$$f_3(n) = n^{10}\cdot 2^{n/2}$$f_4(n) = \sum_{i=1}^{n}(i+1)$ ...
2 2 votes
1 1 answer
116
116 views
Arrange the following functions in increasing order of asymptotic growth:$f_1(n) = 2^{2^{1000000}}$$f_2(n) = 2^{100000n}$$f_3(n) = {}^{n}C_{2}$$f_4(n) = n\sqrt n$ $f_1(n)...
0 0 votes
1 1 answer
117
117 views
Consider the following code:sum = 0 for i in range(n): sum += i k = n while k 0: k = k // 2What is the time complexity?$O(n)$ $O(\log n)$ $O(n \log n)$ $O(n^2)$
3 3 votes
1 1 answer
139
139 views
Consider the following C code:int sum = 0; for (int i = 0; i < n; i++) { sum += i; int k = n; while (k 0) { k = k / 2; } }What is the time complexity?$O(n)$ $O(\log n)$ ...
4 4 votes
1 1 answer
152
152 views
Arrange the following functions in increasing order of asymptotic growth:$f_1(n) = \log(n^n)$$f_2(n) = (\log n)^n$$f_3(n) = \log(n^{6006})$$f_4(n) = (\log n)^{6006}$$f_5(...
4 4 votes
1 1 answer
132
132 views
Suppose we have three functions $f(n)$, $g(n)$, and $h(n)$ such that:$f(n) \in O(g(n))\qquad$ and $\qquad g(n) \in O(h(n))$Which of the following statements are guarantee...
3 3 votes
1 1 answer
129
129 views
Suppose $g(n) \in \Theta(n^3)$.Which of the following statements are always true?$\text{S1}:$ $g(n) \in O(n^3)$ $\text{S2}:$ $g(n) \in \Theta(n)$ $\text{S3}:$ $g(n) \in \...
4 4 votes
1 1 answer
142
142 views
Arrange the following functions in increasing order of asymptotic growth:$f_1(n) = n^{0.999999}\log n$ $f_2(n) = 10000000n$ $f_3(n) = 1.000001^n$ $f_4(n) = n^2$ $f_1(n)< ...
0 0 votes
1 1 answer
112
112 views
Consider the following dictionary:goals = {"Country":{"Ronaldo":123,"Messi":103,"Pele":83}, "Club":{"Ronaldo":[512,51,158],"Pele":[604,49,26]}}Which of the following stat...