BFS of graph (directed graph)

question–>
https://practice.geeksforgeeks.org/problems/bfs-traversal-of-graph/1#
code–>


not giving correct ouput

It’s working now, https://ide.codingblocks.com/s/436837

thanks bro @keshavgupta0103

question–>dfs
https://practice.geeksforgeeks.org/problems/depth-first-traversal-for-a-graph/1#
code–>


this also is not passing all testcases

It’s working https://ide.codingblocks.com/s/437729

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.