Update min and index , if current element > adjacent elements
else if ( list . get ( j ) > list . get ( j - 1 ) && list . get ( j ) > list . get ( j + 1 ) && min > list . get ( j ) ) { min = list . get ( j ) ; index = j ; } }