Time Left - 15:00 mins
GATE CS 2021 : Algorithm 7
Attempt now to get your rank among 584 students!
Question 1
An algorithm to find the length of the longest monotonically increasing sequence of numbers in an array
A[0: n - 1] is given below.
Let L; denote the length of the longest monotonically increasing sequence starting at index i in the array.
Initialize Ln-1 = 1.
For all i such that 0 ≤ i ≤ n – 2
Finally the length of the longest monotonically increasing sequence is Max (L0, L1,……., Ln-1).
Which of the following statements is TRUE?
A[0: n - 1] is given below.
Let L; denote the length of the longest monotonically increasing sequence starting at index i in the array.
Initialize Ln-1 = 1.
For all i such that 0 ≤ i ≤ n – 2
Finally the length of the longest monotonically increasing sequence is Max (L0, L1,……., Ln-1).
Which of the following statements is TRUE?
Question 2
Consider the following sequence of elements.
Find the maximum sum of contiguous subsequence of a list S.
Find the maximum sum of contiguous subsequence of a list S.
Question 3
In a 0/1 Knapsack Problem, what is the amount of time taken to create the memory table and determine the optimal solution respectively, for K number of objects and T as the capacity of Knapsack?
Question 4
Match the pairs in the following:
Question 5
Match List-I (Dynamic algorithm) with List-II (Average case running time) and select the correct answer using the codes given below the lists:
Question 6
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on
- 584 attempts
- 2 upvotes
- 11 comments
Tags :
GATE & PSU CSAlgorithmsJun 22GATE & PSU CS