-
Notifications
You must be signed in to change notification settings - Fork 507
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
CSES Subarray Sums II - Wrong Time Complexity #5016
Conversation
Map takes O(logn) for every access
i mean you could replace it with unordered map but that literally makes it slower |
maybe just add a note the log factor is caused by hashmap |
huh? hashmap doesn't have a log factor btw, the Python solution now TLEs on CSES due to hacks 😆 |
unlucky, we should prob add a warning for that |
https://usaco.guide/problems/cses-1661-subarray-sums-ii/solution
STL ordered map data structure used for implementation with N accesses.
Each access takes logn.
Time complexity should be O(N log N), is incorrectly denoted O(N).
Place an "x" in the corresponding checkbox if it is done or does not apply to this pull request.