当前位置:网站首页>快速排序
快速排序
2022-06-13 06:58:00 【码道人】
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);
}边栏推荐
- C # mapping from entity class to database (SQLite)
- Tikv key performance parameters and optimization
- 時間格式化工具----moment.js(網頁時間實時展示)
- 【騰訊阿裏最全面試題集錦】(四面:3輪技術+1輪HR)
- Upper computer development (detailed design of firmware download software)
- Fe of mL: introduction to vintage curve /vintage analysis, calculation logic and detailed introduction to case application
- 面试必刷算法TOP101之单调栈 TOP31
- 景联文科技提供语音数据采集标注服务
- 测试开发程序员,你还在迷茫吗?不能把自己定义为码农......
- 杭州网上开户是安全的吗?
猜你喜欢

That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?

Brief introduction to basic usage of echart

10 Honest Facts I Want To Share With All Junior Developers

Test development programmers, are you still confused? You can't define yourself as a yard farmer

Periodontitis investigation (ongoing)

Tidb index optimization

How to seize the bonus of social e-commerce through brand play to achieve growth and profit?

Jfinal uses freemaker to output map.
![[SketchUp 2021] sketch master's image output and rendering style description [edge setting, plane setting, background setting, watermark setting, modeling setting, sky background creating sky, creatin](/img/95/a86b461c547bab41b2053073275d24.png)
[SketchUp 2021] sketch master's image output and rendering style description [edge setting, plane setting, background setting, watermark setting, modeling setting, sky background creating sky, creatin

景联文科技:数据采集标注行业现状及解决方案
随机推荐
Pngquant batch bat and parameter description
[Collection des questions d'examen les plus complètes de Tencent Ali] (quatre côtés: 3 tours de technologie + 1 tour de RH)
10 Honest Facts I Want To Share With All Junior Developers
怎么写出一份令人惊叹的设计文档?
如何使用望友DFM軟件進行冷板分析
Multithreading tests network conditions. Machines in different network segments use nbtstat to judge whether they are powered on
Session and browser
Detailed Mr Atlas of hip joint (Reprinted)
Tikv key performance parameters and optimization
MongoDB系列之SQL和NoSQL的区别
What does my financial product mean in clearing?
An article allows you to quickly understand the fission growth password of social e-commerce user marketing and avoid stepping on the pit
Intelligent entertainment has developed steadily, and jinglianwen technology provides data collection and labeling services
That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
景联文科技提供一站式智能家居数据采集标注解决方案
Jinglianwen technology provides voice data acquisition and labeling services
[SketchUp 2021] sketch master's image output and rendering style description [edge setting, plane setting, background setting, watermark setting, modeling setting, sky background creating sky, creatin
Tidb server tuning
Socket programming server and client (multiple clients can connect to the same port of a server at the same time)
线程池中的 工作线程如何被回收