Quick Overview

Find the longest contiguous non-decreasing run obtainable after replacing at most one array element. The prompt permits any integer replacement or no replacement and defines equality, contiguity, and the returned length for a deterministic linear-time target.

Find the Longest Non-Decreasing Subarray After One Replacement

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Find the longest contiguous non-decreasing run obtainable after replacing at most one array element. The prompt permits any integer replacement or no replacement and defines equality, contiguity, and the returned length for a deterministic linear-time target.

Read the full Google Software Engineer interview experience this question came from

Loading…