QuizWit

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ QuizWit ] in KIDS
글 쓴 이(By): ksangeun (Mar.Proust)
날 짜 (Date): 2001년 3월 14일 수요일 오전 11시 32분 11초
제 목(Title): Re: linked list shuffling


완전 렌덤하고, 메모리도 적게 차지하는 솔루션을 방금 급조해봤는데요,

가장... 인지는 모르겠습니다..

그리 빠르지는 않겠군요.. seeking하는데 시간을 많이 잡아먹을것 같으니..


CLinkedList new_list;
int count = old_list->GetCount();
for(int i = count; i > 0; i--){
int value = Rand()%i;
new_list.AddTail(old_list->GetAt(value));
old_list->RemoveAt(value);
}

[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.