1

GATE CSE 2008

MCQ (Single Correct Answer)

+2

-0.6

We have a binary heap on n elements and wish to insert n more elements (not
necessarily one after another) into this heap. The total time required for this is

2

GATE CSE 2007

MCQ (Single Correct Answer)

+2

-0.6

Consider the process of inserting an element into a Max Heap, where the Max
Heap is represented by an array. Suppose we perform a binary search on the
path from the new leaf to the root to find the position for the newly inserted
element, the number of comparisons performed is:

3

GATE CSE 2006

MCQ (Single Correct Answer)

+2

-0.6

Given two arrays of numbers a

_{1},......,a_{n}and b_{1},......, b_{n}where each number is 0 or 1, the fastest algorithm to find the largest span (i, j) such that a_{i}+a_{i+1}......a_{j}= b_{i}+b_{i+1}......b_{j}or report that there is not such span,4

GATE CSE 2006

MCQ (Single Correct Answer)

+2

-0.6

A 3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as follows: The root is stored in the first location, a[0], nodes in the next level, from left to right, is stored from a[1] to a[3]. The nodes from the second level of the tree from left to right are stored from a[4] location onward. An item x can be inserted into a 3-ary heap containing n items by placing x in the location a[n] and pushing it up the tree to satisfy the heap property.

Which one of the following is a valid sequence of elements in an array representing 3-ary max heap?

Questions Asked from Searching and Sorting (Marks 2)

Number in Brackets after Paper Indicates No. of Questions

GATE CSE 2021 Set 1 (1)
GATE CSE 2018 (1)
GATE CSE 2016 Set 2 (1)
GATE CSE 2016 Set 1 (1)
GATE CSE 2015 Set 3 (1)
GATE CSE 2015 Set 2 (1)
GATE CSE 2015 Set 1 (1)
GATE CSE 2009 (2)
GATE CSE 2008 (1)
GATE CSE 2007 (1)
GATE CSE 2006 (3)
GATE CSE 2005 (2)
GATE CSE 2004 (1)
GATE CSE 1999 (1)
GATE CSE 1996 (2)
GATE CSE 1994 (1)
GATE CSE 1992 (1)
GATE CSE 1991 (1)
GATE CSE 1990 (2)

GATE CSE Subjects

Discrete Mathematics

Programming Languages

Theory of Computation

Operating Systems

Computer Organization

Database Management System

Data Structures

Computer Networks

Algorithms

Compiler Design

Software Engineering

Web Technologies

General Aptitude