To store the rank of the array element
Dictionary < int , int > ranks = new Dictionary < int , int > ( ) ; int rank = 1 ; for ( int index = 0 ; index < newArray . Length ; index ++ ) { int element = newArray [ index ] ;