快速排序与二分查找
摘要:
// BinarySearch.cpp : Defines the entry point for the console application.//#include "stdafx.h"/*/处理两数交换*/void swap(int& a, int& b){ int temp = a; a = b; b = temp;}//在数组a中,排序区间为[low, high]int partition(int a[],int low, int high){ int temp = a[high];//temp为基准值 int middle = low; ... 阅读全文
posted @ 2014-03-10 23:43 欧阳君 阅读(373) 评论(0) 推荐(0)
浙公网安备 33010602011771号