quick sort algorithm to sort an given array, using objective-c