Update min and index , if first element of list > next element
if ( j == 0 and j + 1 < size ) : NEW_LINE INDENT if ( list1 [ j ] > list1 [ j + 1 ] and min > list1 [ j ] ) : NEW_LINE INDENT min = list1 [ j ] ; NEW_LINE index = j ; NEW_LINE DEDENT DEDENT elif ( j == size - 1 and j - 1 >= 0 ) : NEW_LINE