Initialize Minimum , second minimum , third minimum and fourth minimum element
let minA = Number . MAX_VALUE , minB = Number . MAX_VALUE , minC = Number . MAX_VALUE , minD = Number . MAX_VALUE ; for ( let i = 0 ; i < n ; i ++ ) {