Skip to content

Conversation

Takashiidobe
Copy link
Contributor

Most functions in LinkedList have time complexities in their description:
Like push front:

Adds an element first in the list.

This operation should compute in O(1) time.

Time complexities were missing for the following, so I've added them in this PR:

contains: O(n)
front: O(1)
front_mut: O(1)
back: O(1)
back_mut: O(1)

@rust-highfive
Copy link
Contributor

r? @kennytm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 23, 2021
@rust-log-analyzer

This comment has been minimized.

@ghost ghost mentioned this pull request Sep 24, 2021
@kennytm
Copy link
Member

kennytm commented Sep 24, 2021

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 24, 2021

📌 Commit cebba31 has been approved by kennytm

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 24, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 24, 2021
Add missing time complexities to linked_list.rs

Most functions in LinkedList have time complexities in their description:
Like push front:

```
Adds an element first in the list.

This operation should compute in O(1) time.
```

Time complexities were missing for the following, so I've added them in this PR:

contains: O(n)
front: O(1)
front_mut: O(1)
back: O(1)
back_mut: O(1)
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 24, 2021
Add missing time complexities to linked_list.rs

Most functions in LinkedList have time complexities in their description:
Like push front:

```
Adds an element first in the list.

This operation should compute in O(1) time.
```

Time complexities were missing for the following, so I've added them in this PR:

contains: O(n)
front: O(1)
front_mut: O(1)
back: O(1)
back_mut: O(1)
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 25, 2021
…ingjubilee

Rollup of 8 pull requests

Successful merges:

 - rust-lang#88893 (Add 1.56.0 release notes)
 - rust-lang#89001 (Be explicit about using Binder::dummy)
 - rust-lang#89072 (Avoid a couple of Symbol::as_str calls in cg_llvm )
 - rust-lang#89104 (Simplify scoped_thread)
 - rust-lang#89208 ([rfc 2229] Drop fully captured upvars in the same order as the regular drop code)
 - rust-lang#89210 (Add missing time complexities to linked_list.rs)
 - rust-lang#89217 (Enable "generate-link-to-definition" option on rust tools docs as well)
 - rust-lang#89221 (Give better error for `macro_rules! name!`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@kennytm
Copy link
Member

kennytm commented Sep 25, 2021

@Takashiidobe don't modify the PR after it has been approved. The original changes has already been rolled up into #89230 and merged. please file a new PR for fa1a878.

@kennytm kennytm closed this Sep 25, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 26, 2021
Consistent big O notation

This makes the big O time complexity notation in places with markdown support more consistent.
Inspired by rust-lang#89210
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 28, 2021
Consistent big O notation

This makes the big O time complexity notation in places with markdown support more consistent.
Inspired by rust-lang#89210
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants