This man wanted to solve a leetcode problem but built a whole dedicated playlist instead for that specific problem. I appreciate your this hard work!
@codingcart8 ай бұрын
you got the point :)
@user-swa7897 ай бұрын
def bfstraverse(graph,src,dest,queue): queue = [src] cur = queue.pop(0) if cur==dest: return True for i in graph[cur]: queue.append(i) if (bfstraverse(graph,i,dest,queue))==True: return True return False