惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
O
OpenAI News
WordPress大学
WordPress大学
P
Proofpoint News Feed
J
Java Code Geeks
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Register - Security
The Register - Security
Engineering at Meta
Engineering at Meta
H
Help Net Security
人人都是产品经理
人人都是产品经理
Vercel News
Vercel News
N
Netflix TechBlog - Medium
F
Full Disclosure
U
Unit 42
Latest news
Latest news
N
News and Events Feed by Topic
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
InfoQ
L
LINUX DO - 最新话题
T
Threat Research - Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
K
Kaspersky official blog
Google Online Security Blog
Google Online Security Blog
小众软件
小众软件
I
Intezer
V
V2EX
S
SegmentFault 最新的问题
C
CERT Recently Published Vulnerability Notes
阮一峰的网络日志
阮一峰的网络日志
Security Archives - TechRepublic
Security Archives - TechRepublic
Recent Announcements
Recent Announcements
C
Check Point Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Recorded Future
Recorded Future
博客园 - Franky
Project Zero
Project Zero
S
Securelist
Attack and Defense Labs
Attack and Defense Labs
Spread Privacy
Spread Privacy
The Hacker News
The Hacker News
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
NISL@THU
NISL@THU
云风的 BLOG
云风的 BLOG
S
Secure Thoughts
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed

博客园 - Edward Xie

(转)听微软大牛们谈怎样成为优秀的工程师 深入探讨数据库可用性分组 google的搜索 4 fun 从‘和少妇成功上床’学习‘金融学’(转) osi tcpip (转)Google Wave从入门到进阶 google wave Nehalem thinkpad bios APS in Linux for Lenovo R61i good .net 关于DotNET的整理 幽默 思考 想整这么一套 找个地放哈备忘 UBUNTU游戏集合 mount 中文man(转) 个人收集的一些ubuntu资料 (转)aptitude
冒泡
Edward Xie · 2008-10-08 · via 博客园 - Edward Xie

 1 for (i = 0; i < scores.Length -1 ; i++)
 2 {
 3       for (j = 0; j < scores.Length -1 - i ; j++)
 4       {
 5             if (scores[j] > scores[j + 1])
 6             {
 7                   // 交换元素
 8                   temp = scores[j];
 9                   scores[j] = scores[j + 1];
10                   scores[j + 1= temp;
11             }
12       }13 }

1   3   5   7  ...       2 * i - 1                     2    4     6   8    ...   2 * i