重新学习基础: 用C++写了一遍快速排序

/*
 * 316-quicksort.cpp
 *
 *  Created on: 2020年5月28日
 *      Author: panzhengji
 */

#include
#include

using std::cout;
using std::endl;


void swap(int p_int[], int first , int end){
	int tmp = p_int[end];
	p_int[end]  = p_int[first];
	p_int[first] = tmp;
}

// 从小到大排序
void sort(int p_int[], int start, int end){
	if(!(start

 

你可能感兴趣的:(计算机基础)