Merge sorting in C and Python