Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
9
9 votes
2
2 answers
2.0k
2.0k views
GATE CSE 2026 | Set 2 | Question: 27
Let $G$ be a weighted directed acyclic graph with $m$ edges and $n$ vertices. Given $G$ and a source vertex $s$ in $G$, which one of the following options gives the worst...
gatecse
2.0k
views
asked
Feb 23
Algorithms
gatecse-2026-set2
algorithms
shortest-path
directed-acyclic-graph
time-complexity
two-marks
+
–
9
9 votes
6
6 answers
3.9k
3.9k views
GATE CSE 2026 | Set 2 | Question: 28
Consider an array $A$ of integers of size $n$. The indices of $A$ run from $1$ to $n$. An algorithm is to be designed to check whether $A$ satisfies the condition given b...
gatecse
3.9k
views
asked
Feb 23
Algorithms
gatecse-2026-set2
algorithms
time-complexity
two-marks
+
–
9
9 votes
2
2 answers
1.1k
1.1k views
GATE CSE 2026 | Set 2 | Question: 29
Consider a table $T$, where the elements $T[i][j], 0 \leq i, j \leq n$, represent the cost of the optimal solutions of different subproblems of a problem that is being so...
gatecse
1.1k
views
asked
Feb 23
Algorithms
gatecse-2026-set2
algorithms
dynamic-programming
two-marks
+
–
15
15 votes
5
5 answers
1.8k
1.8k views
GATE CSE 2026 | Set 2 | Question: 39
Consider a binary search tree (BST) with $n$ leaf nodes $(n>0)$. Given any node $V$, the key present in the node is denoted as $\operatorname{Val}(V)$. All the keys prese...
gatecse
1.8k
views
asked
Feb 23
Algorithms
gatecse-2026-set2
algorithms
binary-search-tree
multiple-selects
two-marks
+
–
13
13 votes
7
7 answers
2.3k
2.3k views
GATE CSE 2026 | Set 1 | Question: 7
Consider the following recurrence relations:For all $n>1$,\[\begin{array}{c}T_{1}(n)=4 T_{1}\left(\frac{n}{2}\right)+T_{2}(n) \\T_{2}(n)=5 T_{2}\left(\frac{n}{4}\right)+\...
gatecse
2.3k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
algorithms
time-complexity
one-mark
+
–
5
5 votes
3
3 answers
1.9k
1.9k views
GATE CSE 2026 | Set 1 | Question: 13
Let $n$ be an odd number greater than $100$. Consider a binary minheap with $n$ elements stored in an array $P$ whose index starts from $1$.Which of the following indices...
gatecse
1.9k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
algorithms
binary-heap
multiple-selects
one-mark
+
–
10
10 votes
2
answers
2 answers
1.6k
1.6k views
GATE CSE 2026 | Set 1 | Question: 14
Consider a hash table $P[0,1, \ldots, 10]$ that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function used is $h(x...
gatecse
1.6k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
algorithms
hashing
linear-probing
multiple-selects
one-mark
+
–
7
7 votes
5
5 answers
3.3k
3.3k views
GATE CSE 2026 | Set 1 | Question: 23
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with $23$ no...
gatecse
3.3k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
algorithms
binary-tree
numerical-answers
one-mark
+
–
8
8 votes
4
4 answers
2.8k
2.8k views
GATE CSE 2026 | Set 1 | Question: 30
Let $P$ be the set of all integers from $1$ to $15$. Consider any order of insertion of the elements of $P$ into a binary search tree that creates a complete binary tree....
gatecse
2.8k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
algorithms
binary-search-tree
two-marks
+
–
11
11 votes
3
3 answers
1.9k
1.9k views
GATE CSE 2026 | Set 1 | Question: 31
Let $G(V, E)$ be an undirected, edge-weighted graph with integer weights. The weight of a path is the sum of the weights of the edges in that path. The length of a path i...
gatecse
1.9k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
algorithms
two-marks
graph-algorithms
+
–
8
8 votes
3
3 answers
1.5k
1.5k views
GATE CSE 2026 | Set 1 | Question: 39
Let $G(V, E)$ be a simple, undirected, edge-weighted graph with unique edge weights.Which of the following statements about the minimum spanning trees (MST) of $G$ is/are...
gatecse
1.5k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
two-marks
algorithms
minimum-spanning-tree
multiple-selects
+
–
8
8 votes
5
5 answers
1.8k
1.8k views
GATE CSE 2026 | Set 1 | Question: 40
Consider the following pseudocode for depth-first search (DFS) algorithm which takes a directed graph $G(V, E)$ as input, where $d[v]$ and $f[v]$ are the discovery time a...
gatecse
1.8k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
algorithms
depth-first-search
two-marks
multiple-selects
+
–
21
21 votes
2
2 answers
3.1k
3.1k views
GATE CSE 2026 | Set 1 | Question: 51
Consider the recursive functions represented by the following code segment:int bar(int n) { if (n == 1) return 0; else return 1 + bar(n/2); } int foo(int n) { if (n == 1)...
gatecse
3.1k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
algorithms
recursion
numerical-answers
two-marks
+
–
4
4 votes
3
3 answers
1.7k
1.7k views
GATE CSE 2026 | Set 1 | Question: 52
The following sequence corresponds to the preorder traversal of a binary search tree $T$ :\[50,25,13,40,30,47,75,60,70,80,77\]The position of the element $60$ in the post...
gatecse
1.7k
views
asked
Feb 23
Algorithms
gatecse-2026-set1
numerical-answers
two-marks
binary-search-tree
algorithms
+
–
1
1 vote
0
0 answers
231
231 views
GATE DA 2026 | Python & DS | Memory Based | Question 45
Let $G=(V,E)$ be a directed graph, and let $G^R$ denote the graph obtained by reversing all the edges of $G$.Which of the following statements is/are TRUE?If a vertex $v$...
GO Classes
231
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
python-programming
algorithms
two-marks
+
–
0
0 votes
1
1 answer
252
252 views
GATE DA 2026 | Python & DS | Memory Based | Question 44
Let $$A = [1, 2, 3, 5, 4]$$Let $N_1$ be the number of comparisons performed by Bubble Sort, and $N_2$ be the number of comparisons performed by Insertion SortWhich of th...
GO Classes
252
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
data-structures
algorithms
multiple-selects
two-marks
+
–
1
1 vote
1
1 answer
226
226 views
GATE DA 2026 | Python & DS | Memory Based | Question 43
In Quick Sort, the first element is always chosen as the pivot.Which of the following recurrence relations correctly represent the expected running time?$T(n)=T(1)+T(n-1)...
GO Classes
226
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
algorithms
one-mark
+
–
0
0 votes
0
0 answers
190
190 views
GATE DA 2026 | Python & DS | Memory Based | Question 42
There are $1000$ keys. Find the height (or the number of comparisons in the worst case) required in Binary Search.
GO Classes
190
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
algorithms
data-structures
numerical-answers
two-marks
+
–
0
0 votes
2
2 answers
284
284 views
GATE DA 2026 | Python & DS | Memory Based | Question 41
A binary tree has the following traversals:Preorder traversal$: P, Q, S, E, R, F, G$ Inorder traversal$: S, Q, E, P, F, R, G$ Which of the following statement(s) is/are T...
GO Classes
284
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
data-structures
algorithms
python-programming
multiple-selects
one-mark
+
–
1
1 vote
1
1 answer
464
464 views
GATE CSE 2026 | Set 1 | Algorithms | Memory Based | Question 38
Suppose the input directed graph $G(V,E)$ is a DAG. For an edge $(u,v)\in E$, which of the following will NEVER be correct in DFS discovery/finish times?$d[u] < d[v] < f[...
GO Classes
464
views
asked
Feb 12
Algorithms
goclasses
gate2026_cs_set1_memorybased
algorithms
graph-algorithms
depth-first-search
multiple-selects
two-marks
+
–
2
2 votes
1
1 answer
633
633 views
GATE CSE 2026 | Set 1 | Algorithms | Memory Based | Question 36
If there is no path from $\delta$ to a of length at most k , then $d_k(u)=\infty$Statement 1: For every $u \geq 0$ and $u \in V, d_{k+1}(u) \leq d_k(u)$.Statement 2: For ...
GO Classes
633
views
asked
Feb 12
Algorithms
goclasses
gate2026_cs_set1_memorybased
algorithms
graph-algorithms
shortest-path
numerical-answers
two-marks
+
–
4
4 votes
2
2 answers
534
534 views
GATE CSE 2026 | Set 1 | Algorithms | Memory Based | Question 34
Consider the following:For all $n>1$$$\begin{aligned}& T_1(n)=4 T_1(n / 2)+T_2(n) \\\\& T_2(n)=5 T_2(n / 4)+\theta\left(\log _2 n\right)\end{aligned}$$Assume that for all...
GO Classes
534
views
asked
Feb 12
Algorithms
goclasses
gate2026_cs_set1_memorybased
algorithms
master-theorem
recurrence-relation
one-mark
+
–
0
0 votes
1
1 answer
462
462 views
GATE CSE 2026 | Set 1 | Algorithms | Memory Based | Question 33
Let $\mathrm{G}(\mathrm{V}, \mathrm{E})$ be a simple, undirected, edge-weighted graph with unique edge weights.Which of the following statements about MST (minimum spanni...
GO Classes
462
views
asked
Feb 12
Algorithms
goclasses
gate2026_cs_set1_memorybased
algorithms
minimum-spanning-tree
multiple-selects
one-mark
+
–
0
0 votes
1
1 answer
491
491 views
GATE CSE 2026 | Set 2 | Algorithms | Memory Based | Question 20
Let $G$ be a weighted directed acyclic graph (DAG) with $m$ vertices and $n$ edges. Given $G$ and a source vertex $S$, which of the following options gives the worst-case...
GO Classes
491
views
asked
Feb 10
Algorithms
goclasses
gate2026_cs_set2_memorybased
algorithms
two-marks
+
–
0
0 votes
0
0 answers
341
341 views
GATE CSE 2026 | Set 2 | Algorithms | Memory Based | Question 19
In dynamic programming,$\verb|A[i][j]|$ is a term, for $1 \leq \verb|i|, \verb|j| \leq n$$\verb|A[0][k] = A[k][0] = 0|$$\verb|A[i][j] = 2A[i-1][j] + 3A[i][j-1]|$Which of ...
GO Classes
341
views
asked
Feb 10
Algorithms
goclasses
gate2026_cs_set2_memorybased
algorithms
two-marks
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
12
...
150
next »