Skip to content

Commit 818bef5

Browse files
committed
don't specify log base in big-O
1 parent 88612e3 commit 818bef5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/liballoc/collections/binary_heap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ impl<T: Ord> BinaryHeap<T> {
622622

623623
// `rebuild` takes O(len1 + len2) operations
624624
// 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
626626
// and about 1 * len2 * log_2(len1) comparisons in the worst case,
627627
// assuming len1 >= len2.
628628
#[inline]
@@ -643,7 +643,7 @@ impl<T: Ord> BinaryHeap<T> {
643643
/// The remaining elements will be removed on drop in heap order.
644644
///
645645
/// 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()`.
647647
/// You should use the latter for most cases.
648648
///
649649
/// # Examples

src/liballoc/collections/btree/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use UnderflowResult::*;
4040
/// performance on *small* nodes of elements which are cheap to compare. However in the future we
4141
/// would like to further explore choosing the optimal search strategy based on the choice of B,
4242
/// 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,
4444
/// however, performance is excellent.
4545
///
4646
/// It is a logic error for a key to be modified in such a way that the key's ordering relative to

0 commit comments

Comments
 (0)