1
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below:
10, 8, 5, 3, 2
Two new elements '1' and '7' are inserted in the heap in that order, The level order traversal of the heap after the insertion of the elements is:
10, 8, 5, 3, 2
Two new elements '1' and '7' are inserted in the heap in that order, The level order traversal of the heap after the insertion of the elements is:
2
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C - function:
double foo(int n){
int i;
double sum;
if(n == 0) return 1.0;
sum = 0.0;
for (i = 0; i < n; i++){
sum += foo(i);
}
return sum;
}
The space complexity of the above function is:3
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C - function:
double foo(int n){
int i;
double sum;
if(n == 0) return 1.0;
sum = 0.0;
for (i = 0; i < n; i++){
sum += foo(i);
}
return sum;
}
Suppose we modify the above function foo() and store the values of foo(i), $$0 \le i \le n$$, as and when they are computed. With this modification, the time complexity for function foo() is significantly reduced. The space complexity of the modified function would be:4
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6
The recurrence equation
T(1) = 1
T(n) = 2T(n - 1)+n, $$n \ge 2$$
Evaluates to
T(1) = 1
T(n) = 2T(n - 1)+n, $$n \ge 2$$
Evaluates to
Questions Asked from Complexity Analysis and Asymptotic Notations (Marks 2)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE 2024 Set 1 (1)
GATE CSE 2023 (1)
GATE CSE 2022 (1)
GATE CSE 2021 Set 2 (1)
GATE CSE 2021 Set 1 (1)
GATE CSE 2019 (1)
GATE CSE 2016 Set 2 (1)
GATE CSE 2015 Set 1 (2)
GATE CSE 2015 Set 3 (1)
GATE CSE 2013 (1)
GATE CSE 2011 (1)
GATE CSE 2008 (5)
GATE CSE 2007 (3)
GATE CSE 2005 (3)
GATE CSE 2004 (4)
GATE CSE 2003 (1)
GATE CSE 2002 (2)
GATE CSE 2000 (1)
GATE CSE 1994 (1)
GATE CSE 1993 (1)
GATE CSE 1990 (1)
GATE CSE 1987 (2)
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages