I wrote the code according to following assumptions the ones with no dependencies gets pushed in queue first and then it’s neighbors are visited.
code for the logic: https://ide.codingblocks.com/s/468554 what is it that am i getting wrong about the problem??