Quick Sort는 왜 Quick Sort 일까요? #253
jjangsungwon
started this conversation in
알고리즘, 자료구조
Replies: 2 comments 4 replies
-
좋은 질문 감사합니다. |
Beta Was this translation helpful? Give feedback.
3 replies
-
이와 관련된 주제로 좋은 글들을 발견해서 주소를 남겨 봅니다! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Quick Sort는 최악의 경우 n^2의 시간 복잡도를 가지는데 왜 일반적으로 가장 빠른 정렬 알고리즘을 Quick Sort라고 할까요?
저는 두 가지 장점 때문에 일반적으로 Quick Sort가 가장 빠른 정렬 알고리즘이라고 생각합니다.
첫째, In-place입니다. 시간 복잡도뿐만 아니라 공간 복잡도도 중요한 속성이라고 생각합니다.
둘째, 비교 대상이 pivot뿐입니다. 따라서 pivot을 캐시 메모리처럼 빠르게 접근할 수 있는 메모리와 접목시키면 시간 효율을 높일 수 있다고 생각합니다.
혹시 다른 이유가 있을까요?
Beta Was this translation helpful? Give feedback.
All reactions