GATE 2000 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2000

54 questions

MCQ 541-mark 54

Questions 31–35 of 54

Q31Array1 markMCQ−0.33 if wrong
An n×nn \times n array vv is defined as follows:
v[i,j]=i−jv\left[i,j\right] = i - j for all i,j,1≤i≤n,1≤j≤ni, j, 1 \leq i \leq n, 1 \leq j \leq n
The sum of the elements of the array vv is

Q32Binary Tree1 markMCQ−0.33 if wrong
Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited `in a postorder, inorder and preorder traversal respectively, of a complete binary tree. Which of the following is always true?

Q33Binary Tree1 markMCQ−0.33 if wrong
Consider the following nested representation of binary trees: (X Y Z) indicates Y and Z are the left and right subtrees, respectively, of node X. Note that Y and Z may be NULL, or further nested. Which of the following represents a valid binary tree?

Q34Asymptotic Notation1 markMCQ−0.33 if wrong
Consider the following functions
f(n)=3nnf(n) = 3n^{\sqrt{n}}
g(n)=2nlog⁡2ng(n) = 2^{\sqrt{n}{\log_{2}n}}
h(n)=n!h(n) = n!
Which of the following is true?

Q35Asymptotic Notation1 markMCQ−0.33 if wrong
Let S be a sorted array of n integers. Let T(n) denote the time taken for the most efficient algorithm to determined if there are two elements with sum less than 1000 in S. Which of the following statement is true?