SAP Labs | Software Developer | 1 December

Question · Posted Apr 2020

Given N jobs where every job is represented by following three elements of it. Start Time Finish Time Profit or Value Associated (>= 0) Find the maximum profit subset of jobs such that no two jobs in the subset overlap. Input: Number of Jobs n = 4 Job Details {Start Time, Finish Time, Profit} Job 1: {1, 2, 50} Job 2: {3, 5, 20} Job 3: {6, 19, 100} Job 4: {2, 100, 200} Output: The maximum profit is 250.

The full answer & interview discussion are available to premium members.

Log in Create a free account