[C언어] 셀렉션 소팅 (selection sorting)
#include #include // rand(), srand() 함수를 사용하기 위한 헤더 #include // time(), clock() 함수를 사용하기 위한 헤더 int N = 100000; // 개수 변수 (100000개의 숫자 저장한다) void selection_sorting(int data[], int n) // Selection Sorting 함수 (오름차순) { int i, j; int temp; // 임시 변수 for(i = 0; i data[j]) // 해당 배열에서 최대값인 경우 위치 변경 { temp = d..
헉!!/C언어
2011. 3. 30. 16:12