정렬, 정렬 알고리즘

Jmnote (토론 | 기여)님의 2018년 9월 2일 (일) 00:07 판 (→‎예시)
sorting, sort
정렬, 소팅, 소트
sorting algorithm
정렬 알고리즘

1 정렬

  • 항목을 순서에 따라 배열하는 일
  • 원소들을 번호순이나 사전 순서와 같이 일정한 순서대로 열거하는 일

2 정렬 알고리즘

  • 정렬에 사용하는 알고리즘

3 종류

4 예시

비교정렬
이름 최선 평균 최악
거품정렬 [math]\displaystyle{ n }[/math] [math]\displaystyle{ n^2 }[/math] [math]\displaystyle{ n^2 }[/math]
삽입정렬 [math]\displaystyle{ n }[/math] [math]\displaystyle{ n^2 }[/math] [math]\displaystyle{ n^2 }[/math]
병합정렬 [math]\displaystyle{ n\log n }[/math] [math]\displaystyle{ n\log n }[/math] [math]\displaystyle{ n\log n }[/math]
힙정렬 [math]\displaystyle{ n }[/math]
(모두 고유키 [math]\displaystyle{ n\log n }[/math])
[math]\displaystyle{ n\log n }[/math] [math]\displaystyle{ n\log n }[/math]
퀵정렬 [math]\displaystyle{ n\log n }[/math]
(변형판 [math]\displaystyle{ n }[/math])
[math]\displaystyle{ n\log n }[/math] [math]\displaystyle{ n^2 }[/math]
비(非)비교정렬

5 같이 보기

6 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}