Also reported as Longest Stable Subarray · LeetCode 1438
Uber phone-screen question, reconstructed from 7 candidate reports (November 2025 to July 2026). Candidates reported 3 follow-ups. The write-up includes a Python solution that passes 6 test cases.