Halloween SalePremium questions, over 30% offUnlock all premium questions for over 30% off
Minimum Triggers to Clear All Balls
Medium
Question
Balls lie on a 2D plane, and balls[i] = [x_i, y_i] is the position of the i-th ball. A pair of balls is connected if it sits on one horizontal line (the y-coordinates match) or one vertical line (the x-coordinates match), with a gap of at most d between them on that line. For two balls on one row, the gap is |x_i - x_j|; on one column it is |y_i - y_j|.
...
Asked at:Uber
More Uber interview questions
- Modified Rock Paper Scissorsmedium
- OA [CodeSignal] Prime Jumpsmedium
- Palindrome Paths From Queryhard
- Longest Valid Container Nestinghard
- Next Palindrome Numbermedium
- Annotate First Pattern Matcheasy
- Nested Arithmetic Expression Evaluatormedium
- Process CPU Time Calculatormedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.