Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
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:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
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.
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.
Late August, 2024
Meta
Senior
Find a path in a binary matrix (similar to shortest path, but any path is fine)
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.