Implementation and test of quick sort