Vivek and Party

Problem code:
https://online.codingblocks.com/app/player/115374/content/73642/5091/code-challenge

Code link:

Can you please help in pointing out the error in my Code?

@mgfags
You have written a DFS topological code for this problem. The code is correct however this problem requires BFS topological sort instead. Try that out.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.