Implementation of various sorting algorithms in C and Python