add algorith that counts array inversions
fix typos