CodingHard
Path existence in graph based on GCD greater than K
Filed under BuyHatke
The question
Given a graph where edges exist between vertices u and v when gcd(u, v) is greater than K, and given source and destination arrays, return an array marking whether a path exists between each source and destination pair.
No write-up yet. Related questions below have one.
Related BuyHatke questions
Collected from public candidate posts and coding forums. Updated Nov 2026.