text: Check if current element is smaller than smallest , the current smallest will become secondSmallest and current element will be the new smallest
code: if ( arr [ i ] < smallest ) { secondSmallest = smallest ; smallest = arr [ i ] ; }