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}}}$$

1 1 vote
1 1 answer
414
414 views
1. Write steps to perform the following operations on the singly linked list given below:i. Insert 96 at the beginning of the list.ii. Insert 17 at the end of the list.ii...
2 2 votes
1 1 answer
588
588 views
1. Write an algorithm to store N numbers in an array. Find the product of the elements of the array that are odd.
3 3 votes
3 3 answers
1.6k
1.6k views
Worst case time complexity of heap sort for $n$ elements?$O(n\log n)$$O(\log n)$$O({n}^2)$$O(n)$
1 1 vote
2 2 answers
1.5k
1.5k views
Which of the following clustering technique is used by K- Means Algorithm:Hierarchical TechniquePartitional techniqueDivisiveAgglomerative 
1 1 vote
1 1 answer
1.3k
1.3k views
Find the minimum spanning distance and the corresponding number of edges for the following graph$10,3$$11,4$$15,4$$28,7$ 
3 3 votes
1 1 answer
2.4k
2.4k views
Match the following:(A) Floyd Warshall(i) shortest path between two vertices(B) Dijkstra(ii) single source shortest path(C) Kruskal's(iii) Minimum spanning tree(D) Bellma...
1 1 vote
1 1 answer
1.4k
1.4k views
The minimum number of arithmetic operations required to evaluate the expression $f(z)=8 x^{3}+3 z+12$$4$$5$$3$$6$ 
3 3 votes
1 1 answer
974
974 views
The asymptotic complexity of 4 functions $f_{1}, f_{2}, f_{3}, f_{4}$ are$f_{1}(n)=2^{n}$$f_{2}(n)=n^{(3 / 2)}$$f_{3}(n)=n \log n$$f_{4}(n)=n^{(\log n)}$Arrange them in i...
0 0 votes
1 1 answer
424
424 views
You are given $68$ identical looking balls, each with a distinct weight. You are given a common balance using which you can compare weights of any pair of balls with a si...
0 0 votes
1 answers 1 answer
524
524 views
9. Consider a reservoir, fitted with a set of taps and drains. The partial pseudocode given below takes as input:$L \quad$ capacity of the reservoir in litres$T$ number o...
0 0 votes
0 0 answers
210
210 views
For two functions $f, g: \mathbb{N} \rightarrow \mathbb{N}$ we say $f=O(g)$ if there exists $n_{0} \in \mathbb{N}$ and $c \in \mathbb{R}^{+}$such that for all $n \geq n_{...
0 0 votes
3 answers 3 answers
1.0k
1.0k views
You are given $68$ identical looking balls, each with a distinct weight. You are given a common balance using which you can compare weights of any pair of balls with a si...
0 0 votes
3 3 answers
624
624 views
Let $A=\left\{a_{1}, a_{2}, \ldots, a_{n}\right\}$ and $B=\left\{b_{1}, b_{2}, \ldots b_{m}\right\}$ be two sorted arrays of $n$ and $m$ numbers, respectively. Devise an ...
0 0 votes
0 0 answers
270
270 views
A set $S \subseteq \mathbb{N}$ is said to be $k$-separated if $\forall x, y \in S$, we have $|x-y| \geq k$Given a set $T \subseteq\{1, \cdots, n\}$ and $k, t \in \mathbb{...
0 0 votes
1 1 answer
709
709 views
What is the time complexity of code given?def fun(n): count = 0 i = n while i>0 : for j in range(i): count += 1 i //= 2 return count$\Theta(\log n)$$\Theta(n)$$\Theta(n \...
1 1 vote
2 2 answers
484
484 views
Consider $\text{Iterated logarithm}$ of $n,$ written $\log^\ast n$ (usually read "$\log$ star $n$"), is the number of times the logarithm (base $2$) function must be iter...
5 5 votes
1 1 answer
508
508 views
Consider the following $\text{C}$ function:def fun1(n): q = 0 for i in range(1, n): p = 0 j = n while j 1: p += 1 j = j // 2 k = 1 while k < p: q += 1 k = k * 2 return q...
6 6 votes
2 2 answers
519
519 views
What will be the time complexity of following code?def mystery(N): i = 1 s = 1 while s <= N: i += 1 s = s + i$\Theta(\sqrt{N})$$\Theta(N)$$\Theta(\log N)$$\Theta\left((\l...
2 2 votes
1 1 answer
435
435 views
def fun(N): i = N while i 0: for j in range(i * 2): print("Hello World") i = i // 2$\Theta(N \log N)$$\Theta(N)$$\Theta(\log N)$$\Theta\left((\log N)^{2}\right)$
1 1 vote
1 1 answer
283
283 views
What is the time complexity of following code?def fun(n): count = 0 i = n while i 0: for j in range(i): count += 1 i //= 2 return count$\Theta(N \log N)$$\Theta(N)$$\The...