trying to figure out how to implement various sorting algorithms in c.