text: Keep track of the number of shifts required to place elements at same indices
code: else { if ( ! diff . ContainsKey ( i - Aindex [ B [ i ] ] ) ) { diff [ i - Aindex [ B [ i ] ] ] = 1 ; } else { diff [ i - Aindex [ B [ i ] ] ] += 1 ; } } }