I am getting TLE. Please help me out
code is https://ide.codingblocks.com/s/308644
and question is Time Needed to Inform All Employees -Leetcode
DFS........and .......Tree
Hey @Bhawna, the thing to be noted here is that the graph is directed so I just commented one line in your code at it works.
However, the time taken is really high so you can check out other efficient solution here, the concept is DFS only but I’m using vector instead of map.
Hope it helps .
Yes ,I got my mistake
Great.
If the question is clear, please mark the doubt cleared, and you can rate your experience as well.