Time Left - 20:00 mins
GATE CS : Algorithms Champion Quiz 1
Attempt now to get your rank among 854 students!
Question 1
The most appropriate matching for the following pairs
Group-I
X: depth first search
Y: breadth-first search
Z: sorting
Group-II
1: heap
2: queue
3: stack
is:
Group-I
X: depth first search
Y: breadth-first search
Z: sorting
Group-II
1: heap
2: queue
3: stack
is:
Question 2
An element in an array X is called a leader if it is greater than all elements to the right of it in X. The best algorithm to find all leaders in an array.
Question 3
Which of the following sorting algorithms has the lowest worst–case complexity?
Question 4
In a bubble Sort, worst-case runtime complexity will be:
Question 5
Which one of the following is the tightest upper bound that represents the number of swaps required to sort n numbers using selection sort?
Question 6
The following are the starting and ending times of activities A, B, C, D, E, F, G and H respectively in chronological order: “as bs cs ae ds ce es fs be de gs ee fe hs ge he”. Here, xs denotes the starting time and xe denotes the ending time of activity X. We need to schedule the activities in a set of rooms available to us. An activity can be scheduled in a room only if the room is reserved for the activity for its entire duration. What is the minimum number of rooms required?
Question 7
The number of elements that can be sorted in Θ(log n) time using heap sort is
Question 8
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is
Question 9
What could be the best algorithm from the following when the time complexity is measured based on the number of swaps performed by the sorting algorithm?
Question 10
You have an array of n elements. Suppose you implement quicksort by always choosing the first element of the array as the pivot. Then the tightest upper bound for the worst case performance is
- 854 attempts
- 4 upvotes
- 46 comments
Tags :
GATE & PSU CSAlgorithmsJun 25GATE & PSU CS