the solution of the ArrayInversionCount