fix rubocop erros and finish quicksort