Grokking Graph Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Mohammed Dh Abbas
Wrong Test Case!

Mohammed Dh Abbas

Jun 6, 2024

for

6

[[2,5],[0,5],[0,4],[1,4],[3,2],[1,3]]

I generated [0, 1, 2, 3, 4, 5] I got an error the validator expects the same particular order which is wrong!!

0

0

Comments
Comments
Mohammed Dh Abbas
Mohammed Dh Abbasa year ago

I take it back actually this is nothing but a standard Khan's algorithm

from collections import deque class Solution: def findOrder(self, tasks, prerequisites): result = [] graph = {} indegree = {} for i in range(tasks): ...
Shubham Vora
Shubham Voraa year ago

Fixed!

On this page