adds mergesort and inversions count algorithm