Skip to content

Commit

Permalink
Fix typo in Heap Sort README lg -> log
Browse files Browse the repository at this point in the history
  • Loading branch information
Satveer Singh committed Feb 6, 2020
1 parent 041c005 commit 43181f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Heap Sort/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ As you can see, the largest items are making their way to the back. We repeat th

> **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.
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.
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.

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

Expand Down

0 comments on commit 43181f5

Please sign in to comment.