Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c22182f

Browse files
Merge pull request #914 from satbot/heapsort-typo
Fix typo in Heap Sort README lg -> log
2 parents 6ac4728 + 43181f5 commit c22182f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Heap Sort/README.markdown‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ As you can see, the largest items are making their way to the back. We repeat th
4242

4343
> **Note:** This process is very similar to [selection sort](../Selection%20Sort/), which repeatedly looks for the minimum item in the remainder of the array. Extracting the minimum or maximum value is what heaps are good at.
4444
45-
Performance of heap sort is **O(n lg n)** in best, worst, and average case. Because we modify the array directly, heap sort can be performed in-place. But it is not a stable sort: the relative order of identical elements is not preserved.
45+
Performance of heap sort is **O(n log n)** in best, worst, and average case. Because we modify the array directly, heap sort can be performed in-place. But it is not a stable sort: the relative order of identical elements is not preserved.
4646

4747
Here's how you can implement heap sort in Swift:
4848

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /