1
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Given two arrays of numbers a1,......,an and b1,......, bn where each number is 0 or 1, the fastest algorithm to find the largest span (i, j) such that ai+ai+1......aj = bi+bi+1......bj or report that there is not such span,
A
Takes O(3n) and $$\Omega(2^{n})$$ time if hashing is permitted
B
Takes O(n3) and $$\Omega(n^{2.5})$$ time in the key comparison model
C
Takes θ(n) time and space
D
Takes $$O(\sqrt n)$$ time only if the sum of the 2n elements is an even number
2
GATE CSE 2006
MCQ (Single Correct Answer)
+1
-0.3
Which one of the following in place sorting algorithms needs the minimum number of swaps?
A
Quick sort
B
Insertion sort
C
Selection sort
D
Heap sort
3
GATE CSE 2006
MCQ (Single Correct Answer)
+1
-0.3
In a binary max heap containing n numbers, the smallest element can be found in time
A
$$O(n)$$
B
$$O(\log n)$$
C
$$O(\log \log n)$$
D
$$O(1)$$
4
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6

Which one of the following grammars generates the following language?

$$L = \left( {{a^i}{b^j}|i \ne j} \right)$$
A
$$\eqalign{ & S \to AC\,|\,CB \cr & C \to aCb\,|\,a\,|\,b \cr & A \to aA\,|\, \in \cr & B \to Bb\,|\, \in \cr} $$
B
$$S \to aS\,|\,Sb\,|\,a\,|\,b$$
C
$$\eqalign{ & S \to AC\,|\,CB \cr & C \to aCb\,|\, \in \cr & A \to aA\,|\, \in \cr & B \to Bb\,|\, \in \cr} $$
D
$$\eqalign{ & S \to AC\,|\,CB \cr & C \to aCb\,|\, \in \cr & A \to aA\,|\,a \cr & B \to Bb\,|\,b \cr} $$
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12