GATE CSE

Divide and Conquer Method

Algorithms

(Past Years Questions)

Marks 1

More
Consider a sequence of 14 elements: A = [-5, -10, 6, 3, -1, -2, 13, 4, -9, -1, 4, 12, -3, 0]. The subsequence sum $$S\le...
GATE CSE 2019
The minimum number of arithmetic operations required to evaluate the polynomial P(X) = X5 + 4X3 + 6X + 5 for a given val...
GATE CSE 2014 Set 3
You have an array of n elements. Suppose you implement quicksort by always choosing the central element of the array as ...
GATE CSE 2014 Set 3
Which one of the following correctly determines the solution of the recurrence relation with T(1) = 1? T(1) = 2T (n/2) +...
GATE CSE 2014 Set 2
Let P be a QuickSort Program to sort numbers in ascending order using the first element as pivot. Let t1 and t2 be the n...
GATE CSE 2014 Set 1
Which of the following statement(s) is / are correct regarding Bellman-Ford shortest path algorithm? P: Always finds a n...
GATE CSE 2009
The usual $$\Theta ({n^2})$$ implementation of Insertion Sort to sort an array uses linear search to identify the positi...
GATE CSE 2003
The solution to the recurrence equation T(2k) = 3 T(2k-1) + 1, T (1) = 1, is:
GATE CSE 2002
Randomized quicksort is an extension of quicksort where the pivot is chosen randomly. What is the worst case complexity ...
GATE CSE 2001
Let s be a sorted array of n integers. Let t(n) denote the time taken for the most efficient algorithm to determined if ...
GATE CSE 2000
A sorting technique is called stable if:
GATE CSE 1999
If one uses straight two-way merge sort algorithm to sort the following elements in ascending order 20, 47, 15, 8, 9, 4,...
GATE CSE 1999
Merge sort uses
GATE CSE 1995
For merging two sorted lists of sizes m and n into a sorted list of size m+n, we require comparisons of
GATE CSE 1995
Which of the following statements is true? I. As the number of entries in a hash table increases, the number of collisio...
GATE CSE 1995

Marks 2

More
The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is ________
GATE CSE 2014 Set 1
Consider the following pseudo code. What is the total number of multiplications to be performed? D = 2 for i = 1 to n do...
GATE CSE 2014 Set 1
Consider the following function: int unknown(int n) { int i, j, k = 0; for (i = n/2; i The return value of the...
GATE CSE 2013
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter. Mul...
GATE CSE 2013
A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case...
GATE CSE 2012
The running time of an algorithm is represented by the following recurrence relation: $$T(n) = \begin{cases} n & n ...
GATE CSE 2009
In quick sort, for sorting n elements, the (n/4)th smallest element is selected as pivot using an O(n) time algorithm. W...
GATE CSE 2009
Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into tw...
GATE CSE 2008
An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs t...
GATE CSE 2007
Consider the following recurrence: $$T\left( n \right){\rm{ }} = {\rm{ 2T(}}\left\lceil {\sqrt n } \right\rceil {\rm{) +...
GATE CSE 2006
The median of n elements can be found in O(n) time. Which one of the following is correct about the complexity of quick ...
GATE CSE 2006
Suppose T(n) = 2T (n/2) + n, T(0) = T(1) = 1 Which one of the following is FALSE?
GATE CSE 2005
Let T(n) be the function defined by $$T(1) =1, \: T(n) = 2T (\lfloor \frac{n}{2} \rfloor ) + \sqrt{n}$$ Which of the fol...
GATE CSE 1997
The recurrence relation T(1) = 2 T(n) = 3T(n/4) + n has the solution, T(n) equals to
GATE CSE 1996
Quicksort is run on two inputs shown below to sort in ascending order taking first element as pivot i) 1, 2, 3,......., ...
GATE CSE 1996
The recurrence relation that arises in relation with the complexity of binary search is:
GATE CSE 1994
Assume that the last element of the set is used as partition element in Quicksort. If n distinct elements from the set [...
GATE CSE 1992
Let P be a quicksort program to sort numbers in ascending order. Let t1 and t2 be the time taken by the program for the ...
GATE CSE 1987
Find a solution to the following recurrence equation T(n) = T(n - 1)+ n T(1) = 1
GATE CSE 1987

EXAM MAP

Graduate Aptitude Test in Engineering

GATE ECE GATE CSE GATE CE GATE EE GATE ME GATE PI GATE IN

Joint Entrance Examination

JEE Main JEE Advanced