quick sort implementation performs in case of equality of several values.