Available question text
Given an array of house colors, return the maximum absolute index distance |i - j| between two houses with different colors. Essentially, find the farthest pair of indices whose color values differ (often achieved by comparing ends to the nearest differently colored house).
Related questions
Continue with questions that share topics or the same question type.
- Painting a Grid With Three Different Colors
Coding
- Add two decimal strings e.g. '123.45' + '236.7'
Coding
- Add Two Integers
Coding · Math
- Add Two Numbers
Coding · Linked List · Math · Recursion
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 2078. Two Furthest Houses With Different Colors
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source