Time Left - 15:00 mins
GATE 2019 - Algorithms Quiz-1 (All Topics ) (App update required to attempt this test)
Attempt now to get your rank among 890 students!
Question 1
What is recurrence relation for the worst case of Quicksort and time complexity in the Worst case of Quick Sort respectively?
Question 2
The running time of an algorithm is represented by the following recurrence relation:
Which one of the following represents the time complexity of the algorithm?
Which one of the following represents the time complexity of the algorithm?
Question 3
Consider the following recurrence relation.
T(n) = T(n-1)+ 1/n if n>1
= 1 otherwise
What is the time complexity?
T(n) = T(n-1)+ 1/n if n>1
= 1 otherwise
What is the time complexity?
Question 4
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:
Question 5
Load the keys 23, 13, 21, 14, 7, 8, and 15 in this order, in a hash table of size 7 using quadratic probing with the hash function h(key) = key % 7.
[Note: The required probe sequences are given by:
How many collisions can occur in the hash table?
[Note: The required probe sequences are given by:
How many collisions can occur in the hash table?
Question 6
Assume that a merge sort algorithm in the worst case takes 30 seconds for an input of size 64. Which of the following most closely approximates the maximum input size of a problem that can be solved in 6 minutes?
- 890 attempts
- 2 upvotes
- 13 comments
Tags :
GATE & PSU CSAlgorithmsApr 5GATE & PSU CS