Find Longest Non-Decreasing Contiguous Sequence with One Substitution
Find the longest non-decreasing contiguous sequence with one substitution. Given an array (e.g. {1, 7, 7, 2, 3, 7, 6, -20}), find the longest non-decreasing contiguous sequence allowing one substitution where all occurrences of a number can be replaced with any integer.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late August, 2024
Find the longest non-decreasing contiguous sequence with one substitution. Given an array (e.g. {1, 7, 7, 2, 3, 7, 6, -20}), find the longest non-decreasing contiguous sequence allowing one substitution where all occurrences of a number can be replaced with any integer.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.