Computer Science EngineeringHardISRO SC (CS)
Job sequencing with deadlines (each job takes 1 unit; profit earned only if finished by its deadline). Jobs as (deadline, profit): (3,22) (2,18) (2,18) (3,19) (2,48). The maximum total profit is:
- A. 94
- B. 100
- C. 89
- D. 82
Correct answer: C. 89
Greedy by profit, placing each job in the latest free slot <= its deadline: profit 89 from 3 job(s).
Practise more Algorithms, Data Structures & Programming (ISRO CS) questionsAlgorithms, Data Structures & Programming (ISRO CS): notes and key points
More Algorithms, Data Structures & Programming (ISRO CS) questions
- Consider the following C fragment. int c=0; for(int i=1;i<=40;i=2) for(int j=1;j<=i;j++) c++; What is c at the end?
- The length of a longest common subsequence of DAAAADDCBB and CBCCDCBBA is:
- Using the Master theorem (extended form), the solution of T(n) = 4T(n/2) + n log^2 n is:
- The keys [40, 18, 25, 51, 17, 19] are inserted in this order into an initially empty AVL tree. The height of the final tree, counted in…
- 0/1 knapsack: item weights [4, 3, 3, 8, 7], values [18, 11, 18, 8, 4], capacity 15. The maximum total value is:
- The number of distinct spanning trees of the complete bipartite graph K2,4 is: