Your question is Minimize Project Timeline with Task Scheduling. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given a list of tasks, each represented by a tuple (task_id, duration, dependencies) where task_id is a unique identifier, duration is the time required to complete the task, and dependencies is a list of task IDs that must be completed before this task, determine the minimum time required to complete all tasks.
You may assume that all tasks can be completed and there are no circular dependencies.
def min_project_time(tasks: list[tuple[int, int, list[int]]]) -> int: