quicksort working only for small array size