Prints the last step
Console . Write ( a [ n - 1 ] + " ▁ occurs ▁ " + cnt + " ▁ times STRNEWLINE " ) ; } static int [ ] reverse ( int [ ] a ) { int i , n = a . Length , t ; for ( i = 0 ; i < n / 2 ; i ++ ) { t = a [ i ] ; a [ i ] = a [ n - i - 1 ] ; a [ n - i - 1 ] = t ; } return a ; }