-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Comments
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
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
The docs for
push_front()
,push_back()
,pop_front()
andpop_back()
all have the following:As best I can tell from reading the source, these are all constant-time operations -- the methods traverse at most two nodes.
The text was updated successfully, but these errors were encountered: