Add time complexities to linked_list.rs
This commit is contained in:
parent
2b862bed98
commit
d63e0f0e47
1 changed files with 10 additions and 0 deletions
|
@ -631,6 +631,8 @@ impl<T> LinkedList<T> {
|
|||
/// Returns `true` if the `LinkedList` contains an element equal to the
|
||||
/// given value.
|
||||
///
|
||||
/// This operation should compute in *O*(*n*) time.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
@ -656,6 +658,8 @@ impl<T> LinkedList<T> {
|
|||
/// Provides a reference to the front element, or `None` if the list is
|
||||
/// empty.
|
||||
///
|
||||
/// This operation should compute in *O*(*1*) time.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
@ -676,6 +680,8 @@ impl<T> LinkedList<T> {
|
|||
/// Provides a mutable reference to the front element, or `None` if the list
|
||||
/// is empty.
|
||||
///
|
||||
/// This operation should compute in *O*(*1*) time.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
@ -702,6 +708,8 @@ impl<T> LinkedList<T> {
|
|||
/// Provides a reference to the back element, or `None` if the list is
|
||||
/// empty.
|
||||
///
|
||||
/// This operation should compute in *O*(*1*) time.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
@ -722,6 +730,8 @@ impl<T> LinkedList<T> {
|
|||
/// Provides a mutable reference to the back element, or `None` if the list
|
||||
/// is empty.
|
||||
///
|
||||
/// This operation should compute in *O*(*1*) time.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
|
Loading…
Reference in a new issue