Available question text
Given sorted values nums and a threshold maxDiff, determine for each query whether two node indices lie in the same connected component of an undirected graph where an edge exists between any pair whose values differ by at most maxDiff. This reduces to grouping indices into contiguous components (or using a disjoint-set) based on adjacent value differences ≤ maxDiff and checking if u and v share a component.
Related questions
Continue with questions that share topics or the same question type.
- Path Existence Queries in a Graph II
Coding
- Design Graph With Shortest Path Calculator
Coding
- Find if Path Exists in Graph
Coding
- Implement Social Graph Snapshot Queries
Coding · Data Structure Design · Graphs
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3532. Path Existence Queries in a Graph I
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source