⚡️ Tryprepforge
Tech & SaaS Senior programming

LeetCode #1971 - Find if Path Exists in Graph\nGiven an undirected graph represented as an array of edges, write a function to check if there is a valid path between two nodes (the start and the end nodes).\n\n**Input:**\nedges = [[0,1],[1,2],[2,3],[3,4]]\nstartNode = 0\nendNode = 4\n\n**Output:**\ntrue\n\n**Constraints:**\n1 <= edges.length <= 10^4\n0 <= edges[i][0], edges[i][1] < 10^4\n

Suggested Answer

Practice More Questions Like This

Generate unlimited interview questions with structured answers, code formatting, and immersive audio explanations.

No credit card required

More Tech & SaaS Interview Prep

Link copied to clipboard