Uber | Onsite

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2021-08-21Added By Anonymous
Source: Link

Company: Uber
Role: unknown
Interview Stage: Onsite
Location: unknown
Year: unknown

Original Post Content:

Given a list of tasks each with the priority, some of which depends on other tasks for executions. Find the right order of tasks in which they should be executed.
Example Input:
t1, 0
t2, 1, [t1, t3]
t3, 2, [t4]
t4, 1
t5, 100


Output:
t1, t4, t3, t2, t5

Comments