Min Amplitude

Problem Overview

  • Core task: In the Min Amplitude problem, given an array A, find the smallest possible amplitude (max − min) after changing up to 3 elements.
  • Input/Output: Input is an array; output is a single value—the minimum achievable amplitude; formal constraints are unspecified.
  • Context: Models reducing outliers to tighten data range in analytics, normalization, or quality control.
  • Source: Asked in Google interviews; a classic coding interview question and common interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: