sorting algorithms in c