If first rank and next ranks are same as that of previous suffix in array , assign the same new rank to this suffix
if ( suffixes [ i ] . rank [ 0 ] == prev_rank && suffixes [ i ] . rank [ 1 ] == suffixes [ i - 1 ] . rank [ 1 ] ) { prev_rank = suffixes [ i ] . rank [ 0 ] ; suffixes [ i ] . rank [ 0 ] = rank ; }