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

Clarification Needed: Ambiguity in Article's Usage of "Map" Data Structure #1249

Open
iosovi opened this issue Mar 4, 2024 · 1 comment
Open

Comments

@iosovi
Copy link

iosovi commented Mar 4, 2024

https://github.com/cp-algorithms/cp-algorithms/blame/101dea5cbf44800d975b5e4d23fdb74c8d92226a/src/string/aho_corasick.md#L83

The author mentions that the time complexity would increase to $O(m \log k)$  when a map is used instead of an array, without specifying whether it refers to a sorted map (like std::map in C++) or an unordered map (like std::unordered_map). This ambiguity can lead to confusion, especially when discussing time complexities. Suggest providing clarification on the type of map being discussed to help readers better understand the context.

@adamant-pwn
Copy link
Member

$\log k$ factor is pretty standard for std::map. I guess we can change it to std::map instead of just "map" to be explicit here. Would you like to make a pull request for this?

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

No branches or pull requests

2 participants