i am still not getting how the time complexicity of bfs can be o(v+e) ?
Time complexity of bfs
what made you think so ? all the nodes and edges are visited once in bfs then why it wont be O(n) ?
i am still not getting how the time complexicity of bfs can be o(v+e) ?
what made you think so ? all the nodes and edges are visited once in bfs then why it wont be O(n) ?