Google Mock Interview
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2025-03-30Added By Anonymous
Source: Link
🧭 Experience: unknown
✅ Outcome: unknown
💰 Compensation: unknown
📍 Location: unknown
🏢 Company: Google
🎓 Education: unknown
🎁 Benefits: unknown
📅 Offer Date: unknown
We are given an array A consisting of N integers. In one move, we can choose any element in this array and replace it with any value. We are interested in the longest consistent segment of identical elements. For example, given an array A = [3, -3, 3, 3, 3, 1, -3], the segment that we are looking for is [3, 3, 3]. What is the maximum length of such a segment that we can achieve by performing at most three moves on the array?
✅ Outcome: unknown
💰 Compensation: unknown
📍 Location: unknown
🏢 Company: Google
🎓 Education: unknown
🎁 Benefits: unknown
📅 Offer Date: unknown
We are given an array A consisting of N integers. In one move, we can choose any element in this array and replace it with any value. We are interested in the longest consistent segment of identical elements. For example, given an array A = [3, -3, 3, 3, 3, 1, -3], the segment that we are looking for is [3, 3, 3]. What is the maximum length of such a segment that we can achieve by performing at most three moves on the array?