Skip to content

Commit

Permalink
docs: update sort docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zxch3n authored and bobzhang committed Mar 19, 2024
1 parent 4feea01 commit 87a4c94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions array/sort.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ fn slice[T](self : ArraySlice[T], start : Int, end : Int) -> ArraySlice[T] {
{ array: self.array, start: self.start + start, end: self.start + end }
}

/// Sorts the array in place.
/// Sorts the array
///
/// It's an unstable sort.
/// It's an in-place, unstable sort(it will reorder equal elements). The time complexity is O(n log n) in the worst case.
///
/// # Example
///
Expand All @@ -68,7 +68,7 @@ pub fn sort[T : Compare](self : Array[T]) {

/// Sorts the array with a key extraction function.
///
/// It's an unstable sort.
/// It's an in-place, unstable sort(it will reorder equal elements). The time complexity is O(n log n) in the worst case.
///
/// # Example
///
Expand All @@ -88,7 +88,7 @@ pub fn sort_by_key[T, K : Compare](self : Array[T], map : (T) -> K) {

/// Sorts the array with a custom comparison function.
///
/// It's an unstable sort.
/// It's an in-place, unstable sort(it will reorder equal elements). The time complexity is O(n log n) in the worst case.
///
/// # Example
///
Expand Down

0 comments on commit 87a4c94

Please sign in to comment.