1
GATE CSE 2008
MCQ (Single Correct Answer)
+1
-0.3
Which of the following is TRUE?
A
The cost of searching an AVL tree is θ (log n) but that of a binary search tree is O(n)
B
The cost of searching an AVL tree is θ (log n) but that of a complete binary tree is θ (n log n)
C
The cost of searching a binary search tree is O (log n ) but that of an AVL tree is θ(n)
D
The cost of searching an AVL tree is θ (n log n) but that of a binary search tree is O(n)
2
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing the integers 1,2,3,4,5,6,7 in the given order. What will be the contents of the list after the function completes execution?
struct node { 
    int value; 
    struct node *next; 
}; 

Void rearrange (struct node *list ){ 
    struct node *p, * q; 
    int temp; 
    if( !list || !list-> next) return; 
    p = list; q = list->next; 
    while (q) { 
      temp = p->value; 
      p-> value = q ->value; 
      q-> value = temp; 
      p = q-> next; 
      q = p ? p->next : 0; 
    } 
}
A
1,2,3,4,5,6,7
B
2,1,4,3,6,5,7
C
1,3,2,5,4,7,6
D
2,3,4,5,6,7,1
3
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multi-level index scheme is used to store the secondary index, the number of first-level and second-level blocks in the multi-level index are respectively
A
8 and 0
B
128 and 6
C
256 and 4
D
512 and 5
4
GATE CSE 2008
MCQ (Single Correct Answer)
+1
-0.3
A clustering index is defined on the fields which are of type
A
non-key and ordering
B
non-key and non-ordering
C
key and ordering
D
key and non-ordering
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