Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2078. Two Furthest Houses With Different Colors
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).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.