bubble
来源:互联网 发布:广东淘宝司法拍卖网站 编辑:程序博客网 时间:2024/04/29 21:36
for (int j = 0; j < files.Length - 1;j++ )
for (int i = 0; i < files.Length - 1 - j; i++)
{
string bubble = files[i];
if (files[i].CompareTo(files[i + 1]) > 0)
{
string temp = files[i];
files[i] = files[i + 1];
files[i + 1] = temp;
}
for (int i = 0; i < files.Length - 1 - j; i++)
{
string bubble = files[i];
if (files[i].CompareTo(files[i + 1]) > 0)
{
string temp = files[i];
files[i] = files[i + 1];
files[i + 1] = temp;
}
}
先写内循环,在写外循环比较顺思路。
0 0
- Bubble
- bubble
- Bubble sort
- bubble.c
- bubble.cpp
- Bubble Sort
- bubble sort
- Bubble Sort
- Bubble Sort
- bubble sort
- Bubble Sort
- bubble sorting
- Bubble Sort
- Bubble Sort
- Bubble Sort
- Bubble(2)
- Bubble(3)
- Bubble(4)
- SPI协议再读
- Mina源码阅读笔记(三)-Mina的连接IoAccpetor
- iOS性能优化策略
- CStringArray使用方法(1)
- javadoc生成注释文档
- bubble
- 程序员面试宝典学习笔记——删除C/C++代码中的注释
- one-wire DS2431
- 【玩转微信公众平台之七】 PHP语法简单介绍
- iOS 内存优化和调试技巧
- leetcode Letter Combinations of a Phone Number
- CRC Implementation Code in C
- 索引列not null与count(*)关系
- Forfiles用法