Skip to content

Commit ff2c65b

Browse files
committed
Add category and description
1 parent 2421d79 commit ff2c65b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

algorithm/category.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"insertion": "Insertion Sort",
1919
"selection": "Selection Sort",
2020
"bubble": "Bubble Sort",
21-
"quick": "Quicksort"
21+
"quick": "Quicksort",
22+
"heap" : "Heap Sort"
2223
}
2324
},
2425
"etc": {

algorithm/sorting/heap/desc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"Heap Sort": "Heapsort is a comparison-based sorting algorithm. Heapsort can be thought of as an improved selection sort: like that algorithm, it divides its input into a sorted and an unsorted region, and it iteratively shrinks the unsorted region by extracting the largest element and moving that to the sorted region. The improvement consists of the use of a heap data structure rather than a linear-time search to find the maximum.",
3+
"Complexity": {
4+
"time": "worst O(n log n), best O(n log n), average O(n log n)",
5+
"space": "worst O(1) auxiliary"
6+
},
7+
"References": [
8+
"<a href='https://en.wikipedia.org/wiki/Heapsort'>Wikipedia</a>"
9+
],
10+
"files": {
11+
"basic": "Basic"
12+
}
13+
}

0 commit comments

Comments
 (0)