Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Webpage for Algorithms
Recent questions tagged algorithms
21
votes
4
answers
3151
GATE CSE 2003 | Question: 21
Consider the following graph: Among the following sequences: abeghf abfehg abfhge afghbe Which are the depth-first traversals of the above graph? I, II and IV only I and IV only II, III and IV only I, III and IV only
Kathleen
asked
in
Algorithms
Sep 16, 2014
by
Kathleen
9.0k
views
gatecse-2003
algorithms
graph-algorithms
normal
graph-search
50
votes
3
answers
3152
GATE CSE 2003 | Question: 20
Consider the following three claims: $(n+k)^m = \Theta(n^m)$ where $k$ and $m$ are constants $2^{n+1} = O(2^n)$ $2^{2n+1} = O(2^n)$ Which of the following claims are correct? I and II I and III II and III I, II, and III
Kathleen
asked
in
Algorithms
Sep 16, 2014
by
Kathleen
14.5k
views
gatecse-2003
algorithms
asymptotic-notations
normal
15
votes
3
answers
3153
GATE CSE 2003 | Question: 12
Ram and Shyam have been asked to show that a certain problem $\Pi$ is $\text{NP-complete}.$ Ram shows a polynomial time reduction from the $\text{3-SAT}$ problem to $\Pi$, and Shyam shows a polynomial time reduction from $\Pi$ to $\text{3-SAT.}$ Which of ... not NP-complete $\Pi$ is in NP, but is not NP-complete $\Pi$ is NP-complete $\Pi$ is neither NP-hard, nor in NP
Kathleen
asked
in
Algorithms
Sep 16, 2014
by
Kathleen
6.4k
views
gatecse-2003
algorithms
p-np-npc-nph
normal
out-of-gate-syllabus
22
votes
3
answers
3154
GATE CSE 2003 | Question: 1
Consider the following $C$ function. For large values of $y$, the return value of the function $f$ best approximates float f,(float x, int y) { float p, s; int i; for (s=1,p=1,i=1; i<y; i++) { p *= x/i; s += p; } return s; } $x^y$ $e^x$ $\text{ln} (1+x)$ $x^x$
Kathleen
asked
in
Algorithms
Sep 16, 2014
by
Kathleen
7.2k
views
gatecse-2003
algorithms
identify-function
normal
55
votes
6
answers
3155
GATE CSE 2006 | Question: 12
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is: Queue Stack Heap B-Tree
Rucha Shelke
asked
in
Algorithms
Sep 16, 2014
by
Rucha Shelke
26.2k
views
gatecse-2006
algorithms
graph-algorithms
easy
26
votes
7
answers
3156
GATE CSE 2006 | Question: 11
Consider a weighted complete graph $G$ on the vertex set $\{v_1,v_2,.....v_n\}$ such that the weight of the edge $(v_i, v_j)$ is $2|i-j|$. The weight of a minimum spanning tree of $G$ is: $n-1$ $2n-2$ $\begin{pmatrix} n \\ 2 \end{pmatrix}$ $n^2$
Rucha Shelke
asked
in
Algorithms
Sep 16, 2014
by
Rucha Shelke
9.7k
views
gatecse-2006
algorithms
spanning-tree
normal
23
votes
3
answers
3157
GATE CSE 2002 | Question: 12
Fill in the blanks in the following template of an algorithm to compute all pairs shortest path lengths in a directed graph $G$ with $n*n$ adjacency matrix $A$. $A[i,j]$ equals $1$ if there is an edge in $G$ from $i$ to $j$ ... containing the blanks in the Algorithm step and fill in the blanks. Fill in the blank: The running time of the Algorithm is $O$(___).
Kathleen
asked
in
Algorithms
Sep 16, 2014
by
Kathleen
5.1k
views
gatecse-2002
algorithms
graph-algorithms
time-complexity
normal
descriptive
42
votes
6
answers
3158
GATE CSE 2002 | Question: 2.11
The running time of the following algorithm Procedure $A(n)$ If $n \leqslant 2$ return ($1$) else return $(A( \lceil \sqrt{n} \rceil))$; is best described by $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
Kathleen
asked
in
Algorithms
Sep 16, 2014
by
Kathleen
14.1k
views
gatecse-2002
algorithms
recurrence-relation
normal
30
votes
2
answers
3159
GATE CSE 2002 | Question: 1.3
The solution to the recurrence equation $T(2^k) = 3T(2^{k-1})+1, T(1) =1$ is $2^k$ $\frac{(3^{k+1}-1)}{2}$ $3^{\log_2 k}$ $2^{\log_3 k}$
Kathleen
asked
in
Algorithms
Sep 15, 2014
by
Kathleen
9.0k
views
gatecse-2002
algorithms
recurrence-relation
normal
50
votes
5
answers
3160
GATE CSE 2012 | Question: 29
Let $G$ be a weighted graph with edge weights greater than one and $G'$ be the graph constructed by squaring the weights of edges in $G$. Let $T$ and $T'$ be the minimum spanning trees of $G$ and $G'$, respectively, with total weights $t$ and $t'$. Which of the ... $T' = T$ with total weight $t' < t^2$ $T' \neq T$ but total weight $t' = t^2$ None of the above
gatecse
asked
in
Algorithms
Sep 15, 2014
by
gatecse
12.3k
views
gatecse-2012
algorithms
spanning-tree
normal
marks-to-all
61
votes
14
answers
3161
GATE CSE 2005 | Question: 39
Suppose there are $\lceil \log n \rceil$ sorted lists of $\lfloor n /\log n \rfloor$ elements each. The time complexity of producing a sorted list of all these elements is: (Hint:Use a heap data structure) $O(n \log \log n)$ $\Theta(n \log n)$ $\Omega(n \log n)$ $\Omega\left(n^{3/2}\right)$
gatecse
asked
in
Algorithms
Sep 15, 2014
by
gatecse
20.1k
views
gatecse-2005
algorithms
sorting
normal
25
votes
3
answers
3162
GATE CSE 2001 | Question: 15
Consider a weighted undirected graph with vertex set $V = \{n1, n2, n3, n4, n5, n6 \}$ ... all possible minimum spanning trees of a graph? Is the maximum among the edge weights of a minimum spanning tree unique over all possible minimum spanning tree of a graph?
Kathleen
asked
in
Algorithms
Sep 15, 2014
by
Kathleen
3.6k
views
gatecse-2001
algorithms
spanning-tree
normal
descriptive
33
votes
7
answers
3163
GATE CSE 2001 | Question: 2.14
Consider an undirected, unweighted graph $G$. Let a breadth-first traversal of $G$ be done starting from a node $r$. Let $d(r,u)$ and $d(r,v)$ be the lengths of the shortest paths from $r$ to $u$ and $v$ respectively in $G$. If $u$ is visited before $v$ during the breadth- ... correct? $d(r,u) < d(r,v)$ $d(r,u) > d(r,v)$ $d(r,u) \leq d(r,v)$ None of the above
Kathleen
asked
in
Algorithms
Sep 15, 2014
by
Kathleen
10.8k
views
gatecse-2001
algorithms
graph-algorithms
normal
graph-search
59
votes
7
answers
3164
GATE CSE 2001 | Question: 1.16
Let $f(n) = n^2 \log n$ and $g(n) = n(\log n)^{10}$ be two positive functions of $n$. Which of the following statements is correct? $f(n) = O(g(n)) \text{ and } g(n) \neq O(f(n))$ $g(n) = O(f(n)) \text{ and } f(n) \neq O(g(n))$ $f(n) \neq O(g(n)) \text{ and } g(n) \neq O(f(n))$ $f(n) =O(g(n)) \text{ and } g(n) = O(f(n))$
Kathleen
asked
in
Algorithms
Sep 14, 2014
by
Kathleen
14.4k
views
gatecse-2001
algorithms
asymptotic-notations
time-complexity
normal
36
votes
4
answers
3165
GATE CSE 2001 | Question: 1.14
Randomized quicksort is an extension of quicksort where the pivot is chosen randomly. What is the worst case complexity of sorting n numbers using Randomized quicksort? $O(n)$ $O(n \log n)$ $O(n^2)$ $O(n!)$
Kathleen
asked
in
Algorithms
Sep 14, 2014
by
Kathleen
11.1k
views
gatecse-2001
algorithms
sorting
time-complexity
easy
37
votes
5
answers
3166
GATE CSE 2000 | Question: 17
An array contains four occurrences of $0$, five occurrences of $1$, and three occurrences of $2$ in any order. The array is to be sorted using swap operations (elements that are swapped need to be adjacent). What is the minimum number of swaps ... ? Give an ordering of elements in the above array so that the minimum number of swaps needed to sort the array is maximum.
Kathleen
asked
in
Algorithms
Sep 14, 2014
by
Kathleen
8.0k
views
gatecse-2000
algorithms
sorting
normal
descriptive
24
votes
3
answers
3167
GATE CSE 2000 | Question: 16
A recursive program to compute Fibonacci numbers is shown below. Assume you are also given an array $f [ 0\ldots m]$ with all elements initialized to $0.$ fib(n) { if (n > M) error (); if (n == 0) return 1; if (n = ... Write the box number and the corresponding contents in your answer book. What is the time complexity of the resulting program when computing $fib(n)?$
Kathleen
asked
in
Programming
Sep 14, 2014
by
Kathleen
3.4k
views
gatecse-2000
algorithms
normal
descriptive
recursion
30
votes
4
answers
3168
GATE CSE 2000 | Question: 2.18
Let $G$ be an undirected connected graph with distinct edge weights. Let $e_{max}$ be the edge with maximum weight and $e_{min}$ the edge with minimum weight. Which of the following statements is false? Every minimum spanning tree of $G$ must ... , then its removal must disconnect $G$ No minimum spanning tree contains $e_{max}$ $G$ has a unique minimum spanning tree
Kathleen
asked
in
Algorithms
Sep 14, 2014
by
Kathleen
12.3k
views
gatecse-2000
algorithms
spanning-tree
normal
67
votes
10
answers
3169
GATE CSE 2000 | Question: 2.17
Consider the following functions $f(n) = 3n^{\sqrt{n}}$ $g(n) = 2^{\sqrt{n}{\log_{2}n}}$ $h(n) = n!$ Which of the following is true? $h(n)$ is $O(f(n))$ $h(n)$ is $O(g(n))$ $g(n)$ is not $O(f(n))$ $f(n)$ is $O(g(n))$
Kathleen
asked
in
Algorithms
Sep 14, 2014
by
Kathleen
18.1k
views
gatecse-2000
algorithms
asymptotic-notations
normal
25
votes
1
answer
3170
GATE CSE 2000 | Question: 2.15
Suppose you are given an array $s[1....n]$ and a procedure reverse $(s, i, j)$ which reverses the order of elements in $s$ between positions $i$ and $j$ (both inclusive). What does the following sequence do, where $1 \leqslant k \leqslant n$: ... reverse (s, 1, n); Rotates $s$ left by $k$ positions Leaves $s$ unchanged Reverses all elements of $s$ None of the above
Kathleen
asked
in
Algorithms
Sep 14, 2014
by
Kathleen
6.9k
views
gatecse-2000
algorithms
normal
identify-function
53
votes
6
answers
3171
GATE CSE 2000 | Question: 1.15
Let $S$ be a sorted array of $n$ integers. Let $T(n)$ denote the time taken for the most efficient algorithm to determined if there are two elements with sum less than $1000$ in $S$. Which of the following statement is true? $T (n)$ is $O(1)$ $n \leq T(n) \leq n \log_2 n$ $n \log_2 n ≤ T(n) < \frac{n}{2}$ $T(n) = \left (\frac{n}{2} \right)$
Kathleen
asked
in
Algorithms
Sep 14, 2014
by
Kathleen
11.4k
views
gatecse-2000
easy
algorithms
time-complexity
23
votes
1
answer
3172
GATE CSE 2000 | Question: 1.13
The most appropriate matching for the following pairs $\begin{array}{|l|l|}\hline \text{X: depth first search} & \text{1: heap } \\\hline \text{Y: breadth first search} & \text{2: queue} \\\hline \text{Z: sorting} & \text{3: stack} \\\hline \end{array}$ ... $\text{X - 3, Y - 2, Z - 1}$ $\text{X - 2, Y - 3, Z - 1}$
Kathleen
asked
in
Algorithms
Sep 14, 2014
by
Kathleen
3.8k
views
gatecse-2000
algorithms
easy
graph-algorithms
graph-search
15
votes
5
answers
3173
GATE CSE 1992 | Question: 8
Let $T$ be a Depth First Tree of a undirected graph $G$. An array $P$ indexed by the vertices of $G$ is given. $P[V]$ is the parent of vertex $V$, in $T$. Parent of the root is the root itself. Give a method for finding ... to the length of the cycle. Describe the algorithm in a PASCAL $(C)$ - like language. Assume that the variables have been suitably declared.
Kathleen
asked
in
Algorithms
Sep 13, 2014
by
Kathleen
3.5k
views
gate1992
algorithms
descriptive
algorithm-design
13
votes
4
answers
3174
GATE CSE 1992 | Question: 07a
Consider the function $F(n)$ for which the pseudocode is given below : Function F(n) begin F1 ← 1 if(n=1) then F ← 3 else For i = 1 to n do begin C ← 0 For j = 1 to n – 1 do begin C ← C + 1 end F1 = F1 * C end F = F1 end [$n$ is a positive integer greater than zero] Derive a recurrence relation for $F(n)$.
Kathleen
asked
in
Algorithms
Sep 13, 2014
by
Kathleen
2.6k
views
gate1992
algorithms
recurrence-relation
descriptive
20
votes
2
answers
3175
GATE CSE 1992 | Question: 03,iv
Assume that the last element of the set is used as partition element in Quicksort. If $n$ distinct elements from the set $\left[1\dots n\right]$ are to be sorted, give an input for which Quicksort takes maximum time.
Kathleen
asked
in
Algorithms
Sep 13, 2014
by
Kathleen
3.6k
views
gate1992
algorithms
sorting
easy
quick-sort
descriptive
9
votes
3
answers
3176
GATE CSE 1992 | Question: 02,vi
Which of the following problems is not $\text{NP}$-hard? Hamiltonian circuit problem The $0/1$ Knapsack problem Finding bi-connected components of a graph The graph coloring problem
Kathleen
asked
in
Algorithms
Sep 13, 2014
by
Kathleen
6.1k
views
gate1992
p-np-npc-nph
algorithms
multiple-selects
out-of-gate-syllabus
33
votes
5
answers
3177
GATE CSE 1992 | Question: 02,ix
Following algorithm(s) can be used to sort $n$ in the range $[1\ldots n^3]$ in $O(n)$ time Heap sort Quick sort Merge sort Radix sort
Kathleen
asked
in
Algorithms
Sep 13, 2014
by
Kathleen
13.4k
views
gate1992
easy
algorithms
sorting
multiple-selects
29
votes
8
answers
3178
GATE CSE 1992 | Question: 01,ix
Complexity of Kruskal’s algorithm for finding the minimum spanning tree of an undirected graph containing $n$ vertices and $m$ edges if the edges are sorted is _______
Kathleen
asked
in
Algorithms
Sep 13, 2014
by
Kathleen
14.1k
views
gate1992
spanning-tree
algorithms
time-complexity
easy
fill-in-the-blanks
22
votes
5
answers
3179
GATE CSE 1991 | Question: 13
Give an optimal algorithm in pseudo-code for sorting a sequence of $n$ numbers which has only $k$ distinct numbers ($k$ is not known a Priori). Give a brief analysis for the time-complexity of your algorithm.
Kathleen
asked
in
Algorithms
Sep 13, 2014
by
Kathleen
4.9k
views
gate1991
sorting
time-complexity
algorithms
difficult
descriptive
16
votes
2
answers
3180
GATE CSE 1991 | Question: 03-viii
Consider the following Pascal function: Function X(M:integer):integer; Var i:integer; Begin i := 0; while i*i < M do i:= i+1 X := i end The function call $X(N)$, if $N$ is positive, will return $\lfloor\sqrt N \rfloor$ $\lfloor\sqrt N \rfloor +1$ $\lceil \sqrt N \rceil$ $\lceil \sqrt N \rceil +1$ None of the above
Kathleen
asked
in
Algorithms
Sep 12, 2014
by
Kathleen
2.4k
views
gate1991
algorithms
easy
identify-function
multiple-selects
Page:
« prev
1
...
101
102
103
104
105
106
107
next »
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Life happens, just chill and do hardwork
ISRO RECRUITMENT FOR SCIENTIST B THROUGH GATE
POWER GRID CORPORATION OF INDIA LIMITED
INSTITUTE OF BANKING PERSONNEL SELECTION
GATE Overflow books for TIFR, ISRO, UGCNET and NIELIT
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(9.1k)
Digital Logic
(3.2k)
Programming and DS
(5.8k)
Algorithms
(4.5k)
Theory of Computation
(6.6k)
Compiler Design
(2.3k)
Operating System
(4.9k)
Databases
(4.5k)
CO and Architecture
(3.7k)
Computer Networks
(4.5k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(648)
Exam Queries
(841)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(855)
Recent questions tagged algorithms
Recent Blog Comments
Tests have been sent and all tests will be...
@GO Classes @Deepak Poonia @Sachin...
@GO Classes @Deepak Poonia sir...
Maximum age limit changed from 35 yrs. to 28...
Hmm, sir totally getting your point ☺️☺️....