Skip to content

Commit 7389b0a

Browse files
committed
Make it clear that push is only amortized O(1)
1 parent c3d60ab commit 7389b0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcollections/vec.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
//! A growable list type with heap-allocated contents, written `Vec<T>` but
1212
//! pronounced 'vector.'
1313
//!
14-
//! Vectors have `O(1)` indexing, push (to the end) and pop (from the end).
14+
//! Vectors have `O(1)` indexing, amortized `O(1)` push (to the end) and
15+
//! `O(1)` pop (from the end).
1516
//!
1617
//! # Examples
1718
//!

0 commit comments

Comments
 (0)