quick sort implementation with shuffling of input array