HARLEY DAVIDSON TECH Hiring Challenge | Off-Campus OA (2023)
Question · Posted Jun 2026
Q1: Find if Path Exists in Graph Problem Statement You are given an undirected graph with n nodes numbered from 0 to n-1 and an array edges, where each edge connects two nodes. Given two nodes, source and destination, determine whether there exists a valid path between them. Return: true if a path exists. false otherwise. Example Input n = 3 edges = [[0,1],[1,2],[2,0]] source = 0 destination = 2 Output true Explanation Node 0 is connected to node 2 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account