Available question text
Given an array of distinct integers, find the minimum number of deletions from the front or back needed to remove both the array's minimum and maximum elements. Because deletions only remove ends, the task reduces to choosing the optimal combination of left/right pops based on the positions of the min and max (n up to 1e5).
Related questions
Continue with questions that share topics or the same question type.
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
- Maximum Score From Removing Stones
Coding
- Maximum Score From Removing Substrings
Coding
- Maximum Square Area by Removing Fences From a Field
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Amazon
Leetcode 2091. Removing Minimum and Maximum From Array
Reported Nov 12, 2024 · 1 source report
JUNIOR
Source snapshot: Nov 12, 2026
View source