File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -622,7 +622,7 @@ impl<T: Ord> BinaryHeap<T> {
622
622
623
623
// `rebuild` takes O(len1 + len2) operations
624
624
// and about 2 * (len1 + len2) comparisons in the worst case
625
- // while `extend` takes O(len2 * log_2 (len1)) operations
625
+ // while `extend` takes O(len2 * log (len1)) operations
626
626
// and about 1 * len2 * log_2(len1) comparisons in the worst case,
627
627
// assuming len1 >= len2.
628
628
#[ inline]
@@ -643,7 +643,7 @@ impl<T: Ord> BinaryHeap<T> {
643
643
/// The remaining elements will be removed on drop in heap order.
644
644
///
645
645
/// Note:
646
- /// * `.drain_sorted()` is `O(n * lg (n))`; much slower than `.drain()`.
646
+ /// * `.drain_sorted()` is `O(n * log (n))`; much slower than `.drain()`.
647
647
/// You should use the latter for most cases.
648
648
///
649
649
/// # Examples
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ use UnderflowResult::*;
40
40
/// performance on *small* nodes of elements which are cheap to compare. However in the future we
41
41
/// would like to further explore choosing the optimal search strategy based on the choice of B,
42
42
/// and possibly other factors. Using linear search, searching for a random element is expected
43
- /// to take O(B * log<sub>B</sub> (n)) comparisons, which is generally worse than a BST. In practice,
43
+ /// to take O(B * log(n)) comparisons, which is generally worse than a BST. In practice,
44
44
/// however, performance is excellent.
45
45
///
46
46
/// It is a logic error for a key to be modified in such a way that the key's ordering relative to
You can’t perform that action at this time.
0 commit comments