The Remove One Element to Make the Array Strictly Increasing interview question asks whether you can remove at most one element from an integer array to make the entire array strictly increasing (each element greater than the previous). You do not have to remove an element — if the array is already strictly increasing, return true.
This problem is asked at Goldman Sachs, eBay, Amazon, and Google because it requires careful boundary reasoning rather than brute force. A naive approach removes each element and checks if the remainder is increasing — O(n^2). The efficient O(n) approach finds the first violation point and then checks only two candidates for removal: the violating element or its predecessor. This tests targeted problem decomposition.
The pattern is linear scan with two targeted checks. Scan the array for the first index i where nums[i] >= nums[i+1] (a violation). If none exists, return true. Otherwise, check two options:
nums[i] — is the resulting array strictly increasing?nums[i+1] — is the resulting array strictly increasing?Write a helper isIncreasing(arr, skip_index) that validates the array while skipping the given index. Return true if either option works.
Array: [1, 2, 10, 5, 7].
nums[2]=10 >= nums[3]=5.[1, 2, 5, 7]. Strictly increasing? Yes → return true.[1, 2, 10, 7]. Not increasing, but we already found a valid option.)i or only i+1) and missing valid cases.isIncreasing helper with an off-by-one when skipping the target index.For the Remove One Element to Make the Array Strictly Increasing coding problem, the array interview pattern relies on finding the first violation and testing exactly two removal candidates. This is much faster than brute force. Practice writing the clean helper function that skips an index — it keeps the main logic readable. Google interviewers appreciate when you explain why only two candidates need to be checked, as this shows you understand the mathematical constraints of the problem.