Time Left - 15:00 mins

GATE 2019 - Algorithms Quiz-3 (Divide And Conquer ) (App update required to attempt this test)

Attempt now to get your rank among 868 students!

Question 1

Four jobs a,b,c,d are there with their respective deadlines 2,1,1,1 The associated profits with them are 20,10,40,30 respectively. Sequence the jobs in order to get the maximum profit. Find the absolute difference of profit earned by completing the jobs and penalty for left out jobs _____________.

Question 2

Which of the following algorithm(s) shows minimum time complexity to sort the array in best case ?

Question 3

Match the following :
A) Power of an element
B) Strassen's Matrix Multiplication
C) Merge Sort
D) Worst case of Job sequencing
1) O(n2.8)
2) O(logn)
3) O(nlogn)
4) O(n2)

Question 4

Consider an array A in which upto some index I , integers are stored which is sorted  and after that NULL values are stored. Let the size of array be n, then the time taken to find the value of I is :

Question 5

Solve the recurrence relation :
T(n) = T() + n

Question 6

Consider an array with 12 elements as : 9 , 11 , 7 , 8 , 2 , 4 , 20 , 22 , 30 , 6 , 50 , 32 with same order as written. Partition algorithm is applied separately 3 times on the array with 3 different pivots. The first time pivot was 11 , second time was 22 and third time was 32. The number of elements to left of pivot be x, y and z in three cases respectively. Find the value of |x+2y+3z| ____________.
  • 868 attempts
  • 4 upvotes
  • 13 comments
Apr 14GATE & PSU CS