Find If Path Exists Problem
Find If Path Exists Problem — ExecCode Medium DSA Practice
Solve the Find If Path Exists problem on ExecCode. Free online medium DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Practice companion for CodeFlow find-if-path-exists.
Examples
Input {"n": 3, "edges": [[0, 1], [1, 2], [2, 0]], "source": 0, "destination": 2}; Output true. Input {"n": 2, "edges": [[0, 1]], "source": 0, "destination": 1}; Output true. Input {"n": 2, "edges": [], "source": 0, "destination": 1}; Output false
Constraints
1 ≤ n ≤ 10^5
Practice Find If Path Exists free on ExecCode. Browse DSA problems, topic map, and placement guides.