###### Stay hungry, stay foolish !

I've failed over and over and over again in my life. And that is why I succeed.

###### 算法导论学习2.3-4 插入排序的递归版本
public class InsertionSortRecursion {
public static void main(String[] args) {
int[] data = {5, 2, 4,6,9,0, 3};
recursion(data, 0, data.length - 1);
for (int i = 0; i < data.length; i++) {
System.out.print(data[i] + " ");
}
}

public static void recursion(int[] data, int i, int j) {

if (i < j) {
int q = j - 1;
recursion(data, i, q);
for (int a = 0; a < j; a++) {
int key = data[j];
if (data[a] < key) {
for (int b = j - 1; b >= a; b--) {
data[b + 1] = data[b];
}
data[a] = key;
break;
}
}
}
}
}


#### 算法导论 2.3-4

2013-05-07 20:20:44

#### 算法导论 思考题 2-4

2016-04-17 21:32:54

#### 2.3 设计算法

2015-08-04 11:00:15

#### 算法导论读书笔记 第二章 算法入门

2008-05-24 23:52:00

#### 算法导论 习题2.3-4（the implemention of insertion sort recursively）

2017-04-15 21:00:56

#### 插入排序的递归实现

2012-06-07 21:42:57

#### 算法导论学习之插入排序

2014-03-02 23:05:23

#### 《算法导论》读书笔记（一）——插入排序与循环不变式

2013-09-02 21:00:01

#### 跟着《算法导论》学习——插入排序与归并排序

2013-12-20 13:52:09

#### 算法导论 练习 2.3-6

2016-04-15 22:22:08