didn't understand, for scanning the adjacency list E, the complexity will O(n), hence the Overall complexity of the problem becomes O(n^2). Unless we don't make an adjacency list as an Array of length N, so our search in adjacency list become O(1).
i guess if u are using a hashmap adjacency list u can simply determine if a node is present or not in O(1) but if you are using a vector then I guess yr answer will be right since if u have to know if a node has a link to you ud have to traverse that vector in O(n) and doing this n times get n^2 complexity
Finally understood the algorithm completely! thank you sir.
yeah
@@sudheerays9559 fuck your yeah
Practice problems on this topic?
thank u so much sir ,,,,,,its really helpfull for me
yeah
didn't understand, for scanning the adjacency list E, the complexity will O(n), hence the Overall
complexity of the problem becomes O(n^2). Unless we don't make an adjacency list as an Array of length N,
so our search in adjacency list become O(1).
i guess if u are using a hashmap adjacency list u can simply determine if a node is present or not in O(1) but if you are using a vector then I guess yr answer will be right since if u have to know if a node has a link to you ud have to traverse that vector in O(n) and doing this n times get n^2 complexity
this is 100x better than my china prof
Thank you sir.
thank you
Badia videos sirji
yeah
amazing
yeah
great
yeah
Thanks
Wm
Q