Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cordyceps::List docs for push_*/pop_* should claim constant time #429

Closed
dataphract opened this issue May 5, 2023 · 1 comment · Fixed by #430
Closed

cordyceps::List docs for push_*/pop_* should claim constant time #429

dataphract opened this issue May 5, 2023 · 1 comment · Fixed by #430

Comments

@dataphract
Copy link

The docs for push_front(), push_back(), pop_front() and pop_back() all have the following:

This operation should compute in O(n) time.

As best I can tell from reading the source, these are all constant-time operations -- the methods traverse at most two nodes.

@hawkw
Copy link
Owner

hawkw commented May 5, 2023

Whoops, I think this was a copy-paste mishap --- good catch!

hawkw added a commit that referenced this issue May 5, 2023
Currently, the `cordyceps::List` documentation states the time
complexity of certain methods, such as `pop_front`, `pop_back`,
`push_front`, and `push_back`, are *O*(*n*), while they are actually
*O*(1). This commit fixes the incorrect docs.

Fixes #429
hawkw added a commit that referenced this issue May 5, 2023
Currently, the `cordyceps::List` documentation states the time
complexity of certain methods, such as `pop_front`, `pop_back`,
`push_front`, and `push_back`, are *O*(*n*), while they are actually
*O*(1). This commit fixes the incorrect docs.

Fixes #429
@hawkw hawkw closed this as completed in #430 May 5, 2023
hawkw added a commit that referenced this issue May 5, 2023
Currently, the `cordyceps::List` documentation states the time
complexity of certain methods, such as `pop_front`, `pop_back`,
`push_front`, and `push_back`, are *O*(*n*), while they are actually
*O*(1). This commit fixes the incorrect docs.

Fixes #429
hawkw added a commit that referenced this issue May 12, 2023
Currently, the `cordyceps::List` documentation states the time
complexity of certain methods, such as `pop_front`, `pop_back`,
`push_front`, and `push_back`, are *O*(*n*), while they are actually
*O*(1). This commit fixes the incorrect docs.

Fixes #429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants