1
GATE CSE 2024 Set 1
MCQ (Single Correct Answer)
+2
-0.66

An array $[82, 101, 90, 11, 111, 75, 33, 131, 44, 93]$ is heapified. Which one of the following options represents the first three elements in the heapified array?

A

82, 90, 101

B

82, 11, 93

C

131, 11, 93

D

131, 111, 90

2
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67
Let P be an array containing n integers. Let t be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary of n elements. Which one of the following choices is correct?
A
t > 2n - 2
B
$$t > 3\left\lceil {\frac{n}{2}} \right\rceil $$ and t ≤ 2n - 2
C
t > n and $$t \le 3\left\lceil {\frac{n}{2}} \right\rceil $$
D
$$t > \left\lceil {{{\log }_2}(n)} \right\rceil $$ and t ≤ n
3
GATE CSE 2021 Set 1
MCQ (More than One Correct Answer)
+2
-0.67

Define Rn to be the maximum amount earned by cutting a rod of length n meters into one or more pieces of integer length and selling them. For i > 0, let p[i] denotes the selling price of a rod whose length is i meters. Consider the array of prices:

p[1] = 1, p[2] = 5, p[3] = 8, p[4] = 9, p[5] = 10, p[6] = 17, p[7] = 18

Which of the following statements is/are correct about R7?

A
R7 cannot be achieved by a solution consisting of three pieces.
B
R7 = 19
C
R7 = 18
D
R7 is achieved by three different solutions.
4
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C functions in which size is the number of elements in the array E:
int MyX(int *E, unsigned int size){
 int Y = 0;
 int Z;
 int i,j,k;
 for(i = 0; i < size; i++)
       Y = Y + E[i];
 for(i = 0; i < size; i++)
   for(j = i; j < size; j++){
     Z = 0;
     for(k = i; k <= j; k++)
        Z = Z + E[k];
     if(Z > Y)
        Y = X;
   }
   return Y;
}
The value returned by the function MyX is the
A
Maximum possible sum of elements in any sub-array of array E.
B
Maximum element in any sub-array of array E.
C
Sum of the maximum elements in all possible sub-arrays of array E.
D
The sum of all elements in the array E.
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
CBSE
Class 12