Search
⌘K
Leetcode 1971. Find if Path Exists in Graph
Given an undirected graph (n up to 2×10^5) as an edge list, determine whether there exists any path between the given source and destination vertices — a connectivity check typically solved with graph traversal or union‑find in O(n + m) time.
Asked at:
Microsoft
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid January, 2026
Microsoft
Senior
Early November, 2025
Microsoft
Senior
Early October, 2024
Meta
Mid-level
Shortest Path in a Social Network: Given a directed social network graph, find the minimum number of steps to reach a target person from a starting person. Return -1 if not possible.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.