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

#3601
4.6k
views
2 answers
6 votes
A rule in a limited entry decision table is arow of the table consisting of condition entriesrow of the table consisting of action entriescolumn of ... corresponding action entriescolumns of the table consisting of conditions of the stub
#3602
10.9k
views
3 answers
10 votes
The time taken by binary search algorithm to search a key in a sorted array of $n$ elements is$O\: (\log_2 \: n)$O \: (n)$O \: (n \: \log_2 \: n)$O \: (n^2)$
#3603
2.3k
views
2 answers
7 votes
The average case and worst case complexities for Merge sort algorithm are$O \: (n^2), O\: (n^2)$O \: (n^2), O\: (n \log_2 n)$ O\: (n \log_2 n), O \: (n^2)$ O\: (n \log_2 n), O\: (n \log_2 n)$
#3604
6.8k
views
3 answers
6 votes
Selection sort algorithm design technique is an example ofGreedy methodDivide-and-conquerDynamic ProgrammingBacktracking
#3605
3.8k
views
3 answers
5 votes
Study the following program//precondition: x>=0 public void demo(int x) { System.out.print(x % 10); if (x % 10 != 0) { demo(x/10); } System.out ... $?$1441$3443$12344321$43211234$
#3606
5.1k
views
1 answers
0 votes
Which algorithm has same average, worst case and best case time ?Binary searchMaximum of n numberQuick sortFibonacci search
#3607
1.9k
views
3 answers
2 votes
Your final exams are over and you are catching up on watching sports on TV. You have a schedule of interesting matches coming up all over the world ... matches you can watch next week. Analyze the worse-case complexity of your algorithm.
#3608
686
views
1 answers
2 votes
Let $A$ be a 30 40 matrix having 500 non-zero entries. For $1 \leq i \leq 30$, let $r_i$ be the number of non-zero entries in the $i$-th row, ... $A$.
#3609
550
views
1 answers
0 votes
int unknown(int n){ int i, j,k=0;for(i=n/2;i<=n;i++) for(j=2;j<=n;j=j*2)k=k+n/2;return(k);}
#3610
463
views
2 answers
0 votes
If we arrange the following according to increasing asymptotic complexity, which quantity comes in the second position; which one comes in the fourth position?$(\sqrt{2}^{\log n}, n^2, 2^{\sqrt{2 \log n} }, e^n, (\log n)!, n!$
#3611
721
views
3 answers
0 votes
Someone claims that Kruskal's algorithm for finding minimum spanning tree can return different spanning trees for the same input graph $G$. Do you agree with the claim? If so, why? If not, argue briefly why the claim is incorrect.
#3612
459
views
1 answers
0 votes
What is the output of the following program?int main() { int i=0; do { if (i >=5) { i+=2; printf("%d \n", i); break; } else { printf("%d \n", ++i); continue; } } while (i<7); }
#3613
2.0k
views
2 answers
0 votes
void A(int n) { int j = 1,i = 0; while (i < n) { i = i + j; j++; } }
#3614
268
views
0 answers
0 votes
#3615
13.3k
views
2 answers
7 votes
Which of the following is true? a. h(n) is O(f(n)) b. h(n) is O(g(n)) c. g(n) is not O(f(n)) d. f(n) is O(g(n))Why not answer c because both f(n) and g(n) have of same order so F(n)=θ g(n).
#3616
7.0k
views
5 answers
7 votes
The number of spanning trees for a complete graph with seven vertices is$2^5$7^5$3^5$2^{2 \times 5}$
#3617
653
views
1 answers
0 votes
#3618
1.7k
views
3 answers
2 votes
Consider the following code . What should be the time complexity?j = n ;while (j >= 1){ for (i = 1 to j ) x = x + 1 ; j = n/2 ; } (A)O(logn)(B)O(n logn)(C)O(n )(D)None of the above
#3619
5.1k
views
1 answers
1 votes
What is /are the application of Hash Function?Construct a message authentication codeDigital signatureTimestampingKey updatingNone
#3620
909
views
2 answers
0 votes