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

#2381
3.4k
views
2 answers
1 votes
Solve thisT(n) = 0.5T(n/2)+1 ; T(1)=1
#2383
255
views
0 answers
0 votes
Have to find MAX of aj-ai in an array where j>=i+l in linear time.How to do it?My approach is to start j from l+1 to n and check min element every time ... only 1st elemrent and for j = l+2 next 2 element and so onIs this approach is right?
#2384
3.0k
views
3 answers
1 votes
The innermost loop will execute when j is multiple of i, and that will happen exactly i times. Please help me to find the time complexity of the below program:
#2385
549
views
1 answers
0 votes
Consider the following recurrence.T(n) = T() + What is the value of recurrence?please explain in detail
#2386
291
views
0 answers
0 votes
For a directed graph with positive wights on edges , bellmann ford runs faster than single source shortest pathtrue or false?
#2387
1.1k
views
1 answers
0 votes
#2389
380
views
1 answers
1 votes
Let f(n), g(n) & h(n) be 3 non-negative functions defined as follows:$f(n) = O(g(n))\; \; \; g(n) \neq O(f(n))$ ... O(h(n))(C). $h(n) \neq O(f(n))$(D). $f(n).h(n) \neq O(g(n).h(n))$
#2390
1.3k
views
0 answers
1 votes
Let f(n), g(n) & h(n) be 3 non-negative functions defined as follows:$f(n) = O(g(n))\; \; \; g(n) \neq O(f(n))$ ... (h(n))(C). $h(n) \neq O(f(n))$(D). $f(n).h(n) \neq O(g(n).h(n))$
#2391
308
views
1 answers
1 votes
N=2^2^k; where k>0;For(i=1;i<n;i++){J=2;While (j<=n){J=j^2;}}What is the time complexity
#2392
248
views
0 answers
0 votes
For a table of 12 items given 19,13,05,27,01,26,31,16,02,09,11,21What will be the output when items of bucket are merged after first distribution??
#2393
1.3k
views
3 answers
7 votes
Which of the following is exact recurrence relation for binary search (in terms of number of comparisons) ?1. T(n) = 2T(n/2) + 12. T(n) = 2T(n/2) + 2Please specify relevant reasons.
#2394
1.8k
views
1 answers
0 votes
Make a 3-by-3 chart with row and column labels WHITE, GRAY, and BLACK. In each cell ( , ) ij , indicate whether, at any point during a depth-first search of ... to a vertex of color j . For each possible edge, indicate what types it can be.
#2395
5.9k
views
3 answers
3 votes
suppose there are 4 sorted lists of n/4 elements each. if we merge these list into a single sorted list of n elements, for the n=400 number of key comparisons in the worst case using an efficient algorithm is
#2396
1.8k
views
3 answers
0 votes
Q. Consider the following functions.f (n) = 3 n + 100, n > 0g (n) = n + log n, n > 0Which of the following is correct for larger values of n?1.f(n) = Ω(g(n)) and f(n) ≠ O (g ... = O(f(n)) and f(n) ≠ Ω (g(n))3. f(n) = θ(g(n))4.None of these
#2397
671
views
1 answers
0 votes
Question: 17 Consider two vertices a and b that are simultaneously on the FIFO queue at same point during the execution of breadth first search from s in an undirected ... shortest path between s and b.3. There is a path between a and b.
#2398
1.0k
views
1 answers
1 votes
Q. The best case of quick sort helps Aditya to sort a particular data set of size n' in 640 ms. Suresh also tried the same algorithm on similar data set and it ... in best case to sort a file of size 16. What could be Aditya's file size?
#2399
274
views
1 answers
0 votes
What is the time complexity to construct a binary tree when inorder and preorder traversal of the tree is given?1. O(n)2.O(n log n)3. O(n2)4.O(n2 log n)
#2400
266
views
1 answers
1 votes
What could be the best algorithm from the following when the time complexity is measured based bon the number of swaps performed by the sorting algorithm?1. Selection sort2. Insertion sort3. Bubble sort4. None of these