|
선택정렬과 이진탐색프로그램을 시작하겠습니다.\n";
cout << "우선 원하시는 자료형을 선택해주십시오." << endl;
cout << "[MENU] 1.integer 2.float 3.double Other.종료 ==>> ";
int select;
cin >> select;
switch(select) {
case 1 : {
DataManagement<int>
|
- 페이지 9페이지
- 가격 1,000원
- 등록일 2005.11.12
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
을 이용하여 n개의 데이터를 정렬하려면 약 n2/2 번의 비교를 수행 ==> O(n2)
-선택정렬 알고리즘에서는 매 단계마다 최대 한번씩의 교환이 일어나므로 전체적으로 볼 때 ==>(n-1)번의 교환이 수행
-선택정렬 알고리즘은 주어진 배열 안에서
|
- 페이지 2페이지
- 가격 800원
- 등록일 2005.05.26
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
#include<iostream>
#include<iomanip>
#include<ctime>
#include<cstdlib>
using namespace std ;
const int cAry_Size = 50 ;
void bldPerm (int randNos[]);
void printData (int data[], int size, int lineSize);
void selectionSort(int randNos[], int last, int& count);
void ex
|
- 페이지 2페이지
- 가격 1,000원
- 등록일 2006.03.05
- 파일종류 기타
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
정렬":(nCase==bubble_sorting)?"버블 정렬":(nCase==select_sorting)?"선택 정렬":(nCase==quick_sorting)?"퀵 정렬":"");
puts("==============");
for(nIdx=0; nIdx<nSize; nIdx++)
{
printf("%3d ", *(pArr+nIdx)); // 출력
}
puts("");
return 0;
}
// 종료 함수
int end_sort(int* pArr)
{
free(pArr); // 입력
|
- 페이지 11페이지
- 가격 1,700원
- 등록일 2014.06.02
- 파일종류 한글(hwp)
- 참고문헌 있음
- 최근 2주 판매 이력 없음
|
|
선택정렬 => ");
Select_Sort(sub_su);
for(i=0;i<MAX;i++)
{
sub_su[i]=main_su[i];
}
printf("** 삽입정렬 => ");
Insert_Sort(sub_su);
return 0;
}
int Bubble_Sort(int a[])
{
int i;
int j;
int temp;
for(i=0;i<MAX;i++)
{
for(j=0;j<MAX-1;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[
|
- 페이지 5페이지
- 가격 1,000원
- 등록일 2009.06.01
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|