Skip to content

Commit 294eb3c

Browse files
authoredJan 27, 2022
Add merge sort document in Korean (trekhleb#632)
* Add merge sort doc in Korean * Update README.md
1 parent 0006350 commit 294eb3c

File tree

2 files changed

+37
-12
lines changed

2 files changed

+37
-12
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# 병합 정렬
2+
3+
컴퓨터과학에서, 병합 정렬(일반적으로 mergesort라고 쓰는)은 효율적이고, 범용적인, 비교 기반의 정렬 알고리즘입니다. 대부분의 구현들은 안정적인 정렬을 만들어내며, 이는 정렬된 산출물에서 동일한 요소들의 입력 순서가 유지된다는 것을 의미합니다. 병합 정렬은 1945년에 John von Neumann이 만든 분할 정복 알고리즘입니다.
4+
5+
병합 정렬의 예시입니다. 우선 리스트를 가장 작은 단위로 나누고(한 개의 요소), 두 개의 인접한 리스트를 정렬하고 병합하기 위해 각 요소와 인접한 리스트를 비교합니다. 마지막으로 모든 요소들은 정렬되고 병합됩니다.
6+
7+
![Merge Sort](https://upload.wikimedia.org/wikipedia/commons/c/cc/Merge-sort-example-300px.gif)
8+
9+
재귀적인 병합 정렬 알고리즘은 7개의 정수값을 가진 배열을 정렬하는데 사용됩니다. 다음은 합병 정렬을 모방하기 위해 사람이 취하는 단계입니다.(하향식)
10+
11+
![Merge Sort](https://upload.wikimedia.org/wikipedia/commons/e/e6/Merge_sort_algorithm_diagram.svg)
12+
13+
## 복잡도
14+
15+
| Name | Best | Average | Worst | Memory | Stable | Comments |
16+
| --------------------- | :-------------: | :-----------------: | :-----------------: | :-------: | :-------: | :-------- |
17+
| **Merge sort** | n log(n) | n log(n) | n log(n) | n | Yes | |
18+
19+
## 참조
20+
21+
- [Wikipedia](https://en.wikipedia.org/wiki/Merge_sort)
22+
- [YouTube](https://www.youtube.com/watch?v=KF2j-9iSf4Q&index=27&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8)

‎src/algorithms/sorting/merge-sort/README.md

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
# Merge Sort
22

3-
In computer science, merge sort (also commonly spelled
4-
mergesort) is an efficient, general-purpose,
5-
comparison-based sorting algorithm. Most implementations
6-
produce a stable sort, which means that the implementation
7-
preserves the input order of equal elements in the sorted
8-
output. Mergesort is a divide and conquer algorithm that
3+
_Read this in other languages:_
4+
[_한국어_](README.ko-KR.md)
5+
6+
In computer science, merge sort (also commonly spelled
7+
mergesort) is an efficient, general-purpose,
8+
comparison-based sorting algorithm. Most implementations
9+
produce a stable sort, which means that the implementation
10+
preserves the input order of equal elements in the sorted
11+
output. Mergesort is a divide and conquer algorithm that
912
was invented by John von Neumann in 1945.
1013

11-
An example of merge sort. First divide the list into
12-
the smallest unit (1 element), then compare each
13-
element with the adjacent list to sort and merge the
14-
two adjacent lists. Finally all the elements are sorted
14+
An example of merge sort. First divide the list into
15+
the smallest unit (1 element), then compare each
16+
element with the adjacent list to sort and merge the
17+
two adjacent lists. Finally all the elements are sorted
1518
and merged.
1619

1720
![Merge Sort](https://upload.wikimedia.org/wikipedia/commons/c/cc/Merge-sort-example-300px.gif)
1821

19-
A recursive merge sort algorithm used to sort an array of 7
20-
integer values. These are the steps a human would take to
22+
A recursive merge sort algorithm used to sort an array of 7
23+
integer values. These are the steps a human would take to
2124
emulate merge sort (top-down).
2225

2326
![Merge Sort](https://upload.wikimedia.org/wikipedia/commons/e/e6/Merge_sort_algorithm_diagram.svg)

0 commit comments

Comments
 (0)
Please sign in to comment.