소개글
JAVA를 이용하여 삽입정렬(Insertion Sort) 알고리즘 구현
실행방식
InsertionSort insertion = new InsertionSort();
int[] datas = { 9, 7, 6, 15, 17, 5, 10, 11 };
insertion.sort(datas);
실행결과
정렬전 데이터 : 9, 7, 6, 15, 17, 5, 10, 11
1차정렬 : 7, 9, 6, 15, 17, 5, 10, 11
2차정렬 : 6, 7, 9, 15, 17, 5, 10, 11
3차정렬 : 6, 7, 9, 15, 17, 5, 10, 11
4차정렬 : 6, 7, 9, 15, 17, 5, 10, 11
5차정렬 : 5, 6, 7, 9, 15, 17, 10, 11
6차정렬 : 5, 6, 7, 9, 10, 15, 17, 11
7차정렬 : 5, 6, 7, 9, 10, 11, 15, 17
정렬후 데이터 : 5, 6, 7, 9, 10, 11, 15, 17
컴파일 실행환경
jdk 1.6이상
압축파일 내 파일목록
.classpath
.project
.settings/org.eclipse.jdt.core.prefs
bin/sort/Execute.class
bin/sort/InsertionSort.class
src/sort/Execute.java
src/sort/InsertionSort.java
참고 자료
없음