Back to problems

Earliest Completion Date

Algorithm · Akuna Capital · Easy

Tasks are provided with two possible dates: a planned date and an alternate date. Process them according to their planned-date order, and determine the earliest date by which all tasks can be finished. At each step, choose the earliest of the task's two dates that is not earlier than the completion date of the previously processed task. The completion date for all tasks is the date selected for the last task. Example Input Example Output Example

Checking your access…