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
27
27 votes
2
answers
2 answers
7.0k
7.0k views
GATE CSE 1996 | Question: 18
Consider the following program that attempts to locate an element $x$ in an array $a[ ]$ using binary search. Assume $N 1$. The program is erroneous. Under what conditio...
Kathleen
7.0k
views
asked
Oct 9, 2014
Algorithms
gate1996
algorithms
searching
normal
descriptive
+
–
39
39 votes
8
answers
8 answers
15.8k
15.8k views
GATE CSE 1996 | Question: 17
Let $G$ be the directed, weighted graph shown in below figureWe are interested in the shortest paths from $A$.Output the sequence of vertices identified by the Dijkstra’s...
Kathleen
15.8k
views
asked
Oct 9, 2014
Algorithms
gate1996
algorithms
graph-algorithms
normal
dijkstras-algorithm
descriptive
+
–
38
38 votes
1
answers
1 answer
8.1k
8.1k views
GATE CSE 1996 | Question: 16
A complete, undirected, weighted graph $G$ is given on the vertex $\{0, 1,\dots, n -1\}$ for any fixed ‘n’. Draw the minimum spanning tree of $G$ ifthe weight of the edge...
Kathleen
8.1k
views
asked
Oct 9, 2014
Algorithms
gate1996
algorithms
graph-algorithms
minimum-spanning-tree
normal
descriptive
+
–
42
42 votes
2
answers
2 answers
9.9k
9.9k views
GATE CSE 1996 | Question: 14
A two dimensional array $A[1..n][1..n]$ of integers is partially sorted if $\forall i, j\in [1..n-1], A[i][j] < A[i][j+1] \text{ and } A[i][j] < A[i+1][j]$The smallest it...
Kathleen
9.9k
views
asked
Oct 9, 2014
Algorithms
gate1996
algorithms
sorting
normal
descriptive
+
–
44
44 votes
5
answers
5 answers
18.2k
18.2k views
GATE CSE 1996 | Question: 2.15
Quick-sort is run on two inputs shown below to sort in ascending order taking first element as pivot$1, 2, 3, \dots n$$n, n-1, n-2, \dots, 2, 1$Let $C_1$ and $C_2$ be the...
Kathleen
18.2k
views
asked
Oct 9, 2014
Algorithms
gate1996
algorithms
sorting
normal
quick-sort
+
–
78
78 votes
10
answers
10 answers
48.1k
48.1k views
GATE CSE 1996 | Question: 2.13, ISRO2016-28
The average number of key comparisons required for a successful search for sequential search on $n$ items is$\dfrac{n}{2}$$\dfrac{n-1}{2}$$\dfrac{n+1}{2}$None of the abov...
Kathleen
48.1k
views
asked
Oct 9, 2014
Algorithms
gate1996
algorithms
easy
isro2016
searching
+
–
32
32 votes
5
answers
5 answers
13.8k
13.8k views
GATE CSE 1996 | Question: 2.12
The recurrence relation$T(1) = 2$$T(n) = 3T (\frac{n}{4}) +n$has the solution $T(n)$ equal to$O(n)$$O (\log n)$$O\left(n^\frac{3}{4}\right)$ None of the above
Kathleen
13.8k
views
asked
Oct 9, 2014
Algorithms
gate1996
algorithms
recurrence-relation
normal
+
–
63
63 votes
5
answers
5 answers
31.3k
31.3k views
GATE CSE 1996 | Question: 1.11
Which of the following is false?$100n \log n=O(\frac{n\log n}{100})$$\sqrt{\log n} = O(\log\log n)$If $0 < x < y \text{ then } n^x = O\left(n^y\right)$$2^n \neq O\left(nk...
Kathleen
31.3k
views
asked
Oct 9, 2014
Algorithms
gate1996
algorithms
asymptotic-notations
normal
+
–
24
24 votes
1
answers
1 answer
8.4k
8.4k views
GATE CSE 1995 | Question: 22
How many minimum spanning trees does the following graph have? Draw them. (Weights are assigned to edges).
Kathleen
8.4k
views
asked
Oct 8, 2014
Algorithms
gate1995
algorithms
graph-algorithms
minimum-spanning-tree
easy
descriptive
+
–
24
24 votes
2
answers
2 answers
11.9k
11.9k views
GATE CSE 1995 | Question: 12
Consider the following sequence of numbers:$$92, 37, 52, 12, 11, 25$$ Use Bubble sort to arrange the sequence in ascending order. Give the sequence at the end of each of ...
Kathleen
11.9k
views
asked
Oct 8, 2014
Algorithms
gate1995
algorithms
sorting
easy
descriptive
bubble-sort
+
–
18
18 votes
3
answers
3 answers
5.8k
5.8k views
GATE CSE 1995 | Question: 4
Consider the following Pascal function where $A$ and $B$ are non-zero positive integers. What is the value of $\text{GET}(3, 2)$?function GET(A,B:integer): integer; begin...
Kathleen
5.8k
views
asked
Oct 8, 2014
Algorithms
gate1995
algorithms
identify-function
normal
descriptive
+
–
24
24 votes
1
answers
1 answer
6.2k
6.2k views
GATE CSE 1995 | Question: 2.9
A language with string manipulation facilities uses the following operationshead(s): first character of a string tail(s): all but exclude the first character of a stringc...
Kathleen
6.2k
views
asked
Oct 8, 2014
Algorithms
gate1995
algorithms
normal
recursion
+
–
15
15 votes
3
answers
3 answers
5.9k
5.9k views
GATE CSE 1995 | Question: 2.3
Assume that $X$ and $Y$ are non-zero positive integers. What does the following Pascal program segment do?while X < Y do if X Y then X := X - Y else Y := Y - X; write(X)...
Kathleen
5.9k
views
asked
Oct 8, 2014
Algorithms
gate1995
algorithms
identify-function
normal
+
–
45
45 votes
6
answers
6 answers
56.9k
56.9k views
GATE CSE 1995 | Question: 1.16
For merging two sorted lists of sizes $m$ and $n$ into a sorted list of size $m+n$, we require comparisons of$O(m)$$O(n)$$O(m+n)$$O(\log m + \log n)$
Kathleen
56.9k
views
asked
Oct 8, 2014
Algorithms
gate1995
algorithms
sorting
normal
merging
+
–
29
29 votes
2
answers
2 answers
7.6k
7.6k views
GATE CSE 1995 | Question: 1.5
Merge sort uses:Divide and conquer strategyBacktracking approachHeuristic searchGreedy approach
Kathleen
7.6k
views
asked
Oct 8, 2014
Algorithms
gate1995
algorithms
sorting
easy
algorithm-design-techniques
merge-sort
+
–
25
25 votes
1
answers
1 answer
8.5k
8.5k views
GATE CSE 1995 | Question: 1.4
In the following Pascal program segment, what is the value of X after the execution of the program segment?X := -10; Y := 20; If X Y then if X < 0 then X := abs(X) else ...
Kathleen
8.5k
views
asked
Oct 8, 2014
Algorithms
gate1995
algorithms
identify-function
easy
+
–
18
18 votes
2
answers
2 answers
8.1k
8.1k views
GATE CSE 1994 | Question: 7
An array $A$ contains $n$ integers in locations $A[0], A , \dots A[n-1]$. It is required to shift the elements of the array cyclically to the left by $K$ places, where $1...
Kathleen
8.1k
views
asked
Oct 5, 2014
Algorithms
gate1994
algorithms
normal
algorithm-design
fill-in-the-blanks
+
–
22
22 votes
4
answers
4 answers
5.7k
5.7k views
GATE CSE 1994 | Question: 6
What function of $x$, $n$ is computed by this program?Function what(x, n:integer): integer: Var value : integer begin value := 1 if n 0 then begin if n mod 2 =1 then val...
Kathleen
5.7k
views
asked
Oct 5, 2014
Algorithms
gate1994
algorithms
identify-function
normal
descriptive
+
–
74
74 votes
8
answers
8 answers
27.0k
27.0k views
GATE CSE 1994 | Question: 1.23
Consider the following two functions:$g_1(n) = \begin{cases} n^3 \text{ for } 0 \leq n \leq 10,000 \\ n^2 \text{ for } n 10,000 \end{cases}$$g_2(n) = \begin{cases} n \te...
Kathleen
27.0k
views
asked
Oct 4, 2014
Algorithms
gate1994
algorithms
asymptotic-notations
normal
multiple-selects
+
–
52
52 votes
7
answers
7 answers
16.5k
16.5k views
GATE CSE 1994 | Question: 1.22
Which of the following statements is false?Optimal binary search tree construction can be performed efficiently using dynamic programmingBreadth-first search cannot be us...
Kathleen
16.5k
views
asked
Oct 4, 2014
Algorithms
gate1994
algorithms
normal
graph-algorithms
+
–
28
28 votes
7
answers
7 answers
23.1k
23.1k views
GATE CSE 1994 | Question: 1.19, ISRO2016-31
Algorithm design technique used in quicksort algorithm is?Dynamic programmingBacktrackingDivide and conquerGreedy method
Kathleen
23.1k
views
asked
Oct 4, 2014
Algorithms
gate1994
algorithms
algorithm-design-techniques
quick-sort
easy
isro2016
+
–
35
35 votes
8
answers
8 answers
25.6k
25.6k views
GATE CSE 1994 | Question: 1.7, ISRO2017-14
The recurrence relation that arises in relation with the complexity of binary search is:$T(n) = 2T\left(\frac{n}{2}\right)+k, \text{ k is a constant }$$T(n) = T\left(\fra...
Kathleen
25.6k
views
asked
Oct 4, 2014
Algorithms
gate1994
algorithms
recurrence-relation
easy
isro2017
+
–
64
64 votes
12
answers
12 answers
37.4k
37.4k views
GATE CSE 2010 | Question: 50
Consider a complete undirected graph with vertex set $\{0, 1, 2, 3, 4\}$. Entry $W_{ij}$ in the matrix $W$ below is the weight of the edge $\{i, j\}$$$W=\begin{pmatrix} 0...
go_editor
37.4k
views
asked
Sep 30, 2014
Algorithms
gatecse-2010
algorithms
minimum-spanning-tree
normal
+
–
44
44 votes
5
answers
5 answers
17.5k
17.5k views
GATE CSE 2010 | Question: 35
What is the value printed by the following C program?#include<stdio.h int f(int *a, int n) { if (n <= 0) return 0; else if (*a % 2 == 0) return *a+f(a+1, n-1); else retur...
go_editor
17.5k
views
asked
Sep 30, 2014
Algorithms
gatecse-2010
algorithms
recursion
identify-function
normal
+
–
20
20 votes
1
answers
1 answer
5.3k
5.3k views
GATE CSE 1993 | Question: 15
Consider the recursive algorithm given below:procedure bubblesort (n); var i,j: index; temp : item; begin for i:=1 to n-1 do if A[i] A[i+1] then begin temp := A[i]; A[i]...
Kathleen
5.3k
views
asked
Sep 29, 2014
Algorithms
gate1993
algorithms
recurrence-relation
normal
descriptive
+
–
55
55 votes
6
answers
6 answers
20.6k
20.6k views
GATE CSE 1993 | Question: 8.7
$\displaystyle \sum_{1\leq k\leq n} O(n)$, where $O(n)$ stands for order $n$ is:$O(n)$$O(n^2)$$O(n^3)$$O(3n^2)$$O(1.5n^2)$
Kathleen
20.6k
views
asked
Sep 29, 2014
Algorithms
gate1993
algorithms
time-complexity
easy
+
–
23
23 votes
4
answers
4 answers
7.5k
7.5k views
GATE CSE 1993 | Question: 7.4
What does the following code do?var a, b: integer; begin a:=a+b; b:=a-b; a:=a-b; end;exchanges $a$ and $b$doubles $a$ and stores in $b$doubles $b$ and stores in $a$leaves...
Kathleen
7.5k
views
asked
Sep 29, 2014
Algorithms
gate1993
algorithms
identify-function
easy
+
–
19
19 votes
6
answers
6 answers
9.1k
9.1k views
GATE CSE 1997 | Question: 15
Consider the following function.Function F(n, m:integer):integer; begin if (n<=0) or (m<=0) then F:=1 else F:F(n-1, m) + F(n-1, m-1); end;Use the recurrence relation $\b...
Kathleen
9.1k
views
asked
Sep 29, 2014
Algorithms
gate1997
algorithms
recurrence-relation
descriptive
+
–
51
51 votes
4
answers
4 answers
12.4k
12.4k views
GATE CSE 1997 | Question: 9
Consider a graph whose vertices are points in the plane with integer co-ordinates $(x,y)$ such that $1 \leq x \leq n$ and $1 \leq y \leq n$, where $n \geq 2$ is an intege...
Kathleen
12.4k
views
asked
Sep 29, 2014
Algorithms
gate1997
algorithms
minimum-spanning-tree
normal
descriptive
+
–
26
26 votes
2
answers
2 answers
10.7k
10.7k views
GATE CSE 1997 | Question: 4.6
Let $T(n)$ be the function defined by $T(1) =1, \: T(n) = 2T (\lfloor \frac{n}{2} \rfloor ) + \sqrt{n}$ for $n \geq 2$.Which of the following statements is true?$T(n) = O...
Kathleen
10.7k
views
asked
Sep 29, 2014
Algorithms
gate1997
algorithms
recurrence-relation
normal
+
–
Page:
« prev
1
...
140
141
142
143
144
145
146
147
148
149
150
151
next »