← Google questions
CodingReported in a candidate post, May 2025

Longest contiguous footpath segment of favorite color

Filed under Google

Given an array `blocks` of integers representing colors and an integer `target`, find the length of the longest contiguous subarray of color `target` if you are allowed to change at most `m` blocks to…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.