[Adobe]Job scheduling problem

You are given N jobs with their start and end time mentioned.These jobs may have their timings overlapped.You have to suggest an algorithm such that maximum number of jobs can be performed in that given time interval.

Comments

  1. Arrange the activities in increasing order of their finish times. Select the first activity. If any activity's starting time is greater than the finish time of last selected activity, select that activity...otherwise discard it and so on..

    ReplyDelete
  2. @Anonymous yes your approach is correct.can you please post a code for others..:)

    ReplyDelete

Post a Comment

Popular posts from this blog