Implement the quick algorithm in C, the partition method is used.