
File:Insertion_sort.gif · Wikimedia Commons · See Wikimedia Commons
삽입 정렬
Sign in to save각 반복에서 현재 입력 요소를 이미 정렬된 요소 사이의 적절한 위치에 삽입하는 정렬 알고리즘
Key facts
- Class
- Sorting algorithm
- Data structure
- Array
- Worst case performance
- O ( n 2 ) {\displaystyle O(n^{2})} comparisons and swaps
- Best case performance
- O ( n ) {\displaystyle O(n)} comparisons, O ( 1 ) {\displaystyle O(1)} swaps
- Average performance
- O ( n 2 ) {\displaystyle O(n^{2})} comparisons and swaps
- Worst case space complexity
- O ( n ) {\displaystyle O(n)} total, O ( 1 ) {\displaystyle O(1)} auxiliary
- Optimal
- No
via Wikipedia infobox
Wikidata facts
- Instance of
- online algorithm
- Image
- Insertion sort.gif
Show 4 more facts
- Commons category
- Insertion sort
- name in kana
- インサーションソート
- Stack Exchange tag
- stackoverflow.com/tags/insertion-sort
- derivative work
- Timsort
Sources (2)
via Wikidata · CC0