GATE (Graduate Aptitude Test in Engineering) Computer Science: Questions 2072 - 2074 of 2080

Access detailed explanations (illustrated with images and videos) to 2080 questions. Access all new questions- tracking exam pattern and syllabus. View the complete topic-wise distribution of questions. Unlimited Access, Unlimited Time, on Unlimited Devices!

View Sample Explanation or View Features.

Rs. 550.00 -OR-

How to register? Already Subscribed?

Question 2072

Appeared in Year: 2020

Question

MCQ▾

In a balanced binary search tree with n elements, what is the worst-case time complexity of reporting all elements in range [a, b] ? Assume that the number of reported elements is k.

Choices

Choice (4)Response

a.

b.

c.

d.

Question 2073

Edit

Appeared in Year: 2020

Question

Numeric Answer▾

Consider a database implemented using B + tree for file indexing and installed on a disk drive with block size of 4 KB. The size of search key is 12 bytes and the size of tree/disk pointer is 8 bytes. Assume that the database has one million records. Also assume that no node of the B + tree and no records are present initially in main memory. Consider that each record fits into one disk block.

The minimum number of disk accesses required to retrieve any record in the database is ________.

Question 2074

Edit

Appeared in Year: 2020

Question

Numeric Answer▾

Consider the following C functions.

  1. intfun1 ( intn ) {
  2. staticinti =0;
  3. if ( n > 0 ) {
  4.   ++i;
  5.   fun1 ( n -1 ) ;
  6. }
  7. return ( i ) ;
  8. }
  9. intfun2 ( intn ) {
  10. staticinti =0;
  11. if ( n > 0 ) {
  12.   i =i +fun1 ( n ) ;
  13.   fun2 ( n -1 ) ;
  14. }
  15. return ( i ) ;
  16. }

The return value of fun2 (5) is ________.

Developed by: