Teaching HPSC Lecturer (Technical) Mock Test 2024 Algorithms Algorithm Design Techniques Greedy Algorithms
Suppose we are given a set of tasks specified by pairs of the start – time and finish times as
T = {(1,2) , (1,3), (1,4), (2,5), (3,7), (4,9), (5,6), (6,8) ,(7,9)}. Select the maximum number of activities that can be performed, assuming that only one single activity can be done at a time. This problem can be solved optimally by which of the design strategies. The time complexity of this problem is ______ .
1
Divide & conquer , O(\({n^2}^{}\))
2
Dynamic programming , O(\({2^n}^{}\))
3
Greedy method, O(n log n)
4
Depth first search, O(n log n)
5
Question Not Attempted