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|}\hline
\textbf{Year}&\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} & 1&2&2& 2 &3&2&1&2&3
\\\hline\textbf{2 Marks Count} &4&2&2& 2 &3&4&2&2.83&4
\\\hline\textbf{Total Marks} &9&6&6& 6 &9&10&\bf{6} & \bf{7.67}&\bf{10}\\\hline
\end{array}}}$$

Recent questions in Algorithms

#1
85
views
1 answers
0 votes
How can we solve this recurrance relation using master's theorem? T(n)=2 * T (n/2) + nlogn
#2
90
views
1 answers
0 votes
Let A1, A2, A3, and A4 be four matrices of dimensions 10 x 5, 5 x 20, 20 x 10, and 10 x 5, respectively. The minimum number of scalar multiplications required to find ... multiplication method is: (A) 1500 (B) 2000 (C) 500 (D) 100
#4
226
views
1 answers
1 votes
How to approach this type of questions?
#5
253
views
1 answers
1 votes
In quick sort, n numbers the (n/10)th element is selected as pivot using n^2 sortimng time complexity what will be the time complexity of quick sort is.....a)O(nlogn)b)O(n^2)c)O(n^3)d)O(n)
#6
167
views
1 answers
2 votes
for (i = 1; i <= N; i++){ for (j= 1;j <= i^2;j=j+i){ //some code}} how is this O(n^2)? explain in detail and simple terms
#7
116
views
0 answers
0 votes
can anyone have the algorithm notes from go classes (PDF or material)
#8
228
views
1 answers
1 votes
What is the returned value by the given function below.Algo fun(n){ If(x<=2) return 1; Else { Return fun(n1/2) + ... }}Note : Assume that all the syntax and data type constraints are valid and just check algorithm.
#9
224
views
0 answers
0 votes
Calculate the minimum and maximum number of element comparisons involved in 2 way merge sort assuming n is power of 2.
#10
157
views
1 answers
0 votes
#11
333
views
1 answers
0 votes
For flag based approach in Bubble sort we can check first by a flag if the list is sorted or not in O(n), and if it is sorted, then no need to sort ... the same concept applicable to selection sort? Why it never comes down from O(n$^2$)?
#12
189
views
1 answers
0 votes
how many spanning trees are possible for complete graph of 4 vertices
#14
1.2k
views
2 answers
1 votes
Consider performing depth-first search (DFS) on an undirected and unweighted graph $G$ starting at vertex $s$. For any vertex $u$ in $G, d[u]$ is the length of the ... , then $(u, v)$ becomes a $\_\_\_\_\_\_\_\_$ edge.treecrossbackgray
#15
1.5k
views
3 answers
0 votes
Consider sorting the following array of integers in ascending order using an inplace Quicksort algorithm that uses the last element as the pivot.\begin{array}{|l|l|l|l|l|}\ ... of swaps performed during this Quicksort is $\_\_\_\_\_\_\_\_$.
#16
1.1k
views
1 answers
0 votes
Let $F(n)$ denote the maximum number of comparisons made while searching for an entry in a sorted array of size $n$ using binary search.Which ONE of the following options is TRUE ... $F(n)=F(n-1)+1$
#17
1.1k
views
1 answers
0 votes
Consider the following sorting algorithms:Bubble sortInsertion sortSelection sortWhich ONE among the following choices of sorting algorithms sorts the numbers in the array $[4,3,2,1,5]$ ... $\text{(ii)}$ and $\text{(iii)}$ only
#18
839
views
1 answers
0 votes
Consider the directed acyclic graph (DAG) below:Which of the following is/are valid vertex orderings that can be obtained from a topological sort of the DAG?$\text{P Q R S T U V}$\ ... $\text{P R Q S V T U}$
#19
3.3k
views
4 answers
4 votes
Let $\text{T(n)}$ be the recurrence relation defined as follows:\[\begin{array}{l}T(0)=1, \\T(1)=2, \text { and } \\T(n)=5 T(n-1)-6 T(n-2) \text { for } ... $T(n)=\Theta\left(n 3^{n}\right)$
#20
3.2k
views
2 answers
2 votes
Let $\text{A}$ be an array containing integer values. The distance of $\text{A}$ is defined as the minimum number of elements in $\text{A}$ that must be replaced with ... order. The distance of the array $[2,5,3,1,4,2,6]$ is ___________.