当前位置:网站首页>Quick sort
Quick sort
2022-06-13 07:05:00 【Code Taoist】
public static void quickSort(int[] arr,int begin,int end){
if(begin>end)
return;
int tmp = arr[begin];
int i =begin;
int j =end;
while (i<j){
while(arr[j]>=tmp && j>i){
j--;
}
arr[i] = arr[j];
while(arr[i]<=tmp && j>i){
i++;
}
arr[j] = arr[i];
}
arr[i] = tmp;
quickSort(arr, begin, i-1);
quickSort(arr, i+1, end);
}
边栏推荐
- Application of DS18B20 temperature sensor based on FPGA
- 考研英语
- NFV基本概述
- Micro isolation (MSG)
- Smart finance is upgraded again, and jinglianwen technology provides data collection and labeling services
- 号称下一代监控系统 来看看它有多牛逼
- [Collection des questions d'examen les plus complètes de Tencent Ali] (quatre côtés: 3 tours de technologie + 1 tour de RH)
- Intelligent entertainment has developed steadily, and jinglianwen technology provides data collection and labeling services
- 对绘制丘岭密度图ridge plot的详细说明、重叠核密度估计曲线overlapping densities、FacetGrid对象、函数sns.kdeplot、函数FacetGrid.map
- c#高级编程-特性篇
猜你喜欢
The biggest highlight of wwdc2022: metalfx
Uploading and retrieving stored images in localstorage
FSM state machine
It's called the next generation monitoring system. Let's see how awesome it is
TiDB Lightning
That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
Smart finance is upgraded again, and jinglianwen technology provides data collection and labeling services
上位机开发(固件下载软件之架构设计)
数字时代进化论
Upper computer development (detailed design of firmware download software)
随机推荐
How to write an amazing design document?
Byte (nine)
[Tencent Alibaba's most comprehensive collection of test questions] (four sides: three rounds of technology +1 round of HR)
Related operations under Oracle Database
【转】FPGA面试题
2022-06-12:在N*N的正方形棋盘中,有N*N个棋子,那么每个格子正好可以拥有一个棋子。 但是现在有些棋子聚集到一个格子上了,比如: 2 0 3 0 1 0 3 0 0 如上的二维数组代表,一
Upper computer development (detailed design of firmware download software)
Comment utiliser le logiciel wangyou DFM pour l'analyse des plaques froides
RT thread simulator lvgl control: button button style
【腾讯阿里最全面试题集锦】(四面:3轮技术+1轮HR)
检测循环数“142857“
【ViveFocus使用WaveVR插件获取手柄操作事件】
1154. day of the year
怎么写出一份令人惊叹的设计文档?
The new business outlet of beautiful Tiantian second mode will be popular in the Internet e-commerce market
Ansible PlayBook的中清单变量优先级分析及清单变量如何分离总结
RT-Thread 模拟器 simulator LVGL控件:slider 控件
That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
基于FPGA的ds18b20温度传感器使用
Will the chain 2+1 model be a new business outlet and a popular Internet e-commerce market?