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

added range update code #1204

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

A-stick-bug
Copy link

Added sqrt decomposition code that supports both range updates and range queries in O(sqrt(n))

Copy link

Visit the preview URL for this PR (for commit 603e7ea):

https://cp-algorithms--preview-1204-f0s8g2k4.web.app

(expires 2023-12-27T02:26:54.469890884Z)

@adamant-pwn
Copy link
Member

Thanks for the pull request! I have few concerns here:

  1. At the moment the implementation is just dumped in the middle of the paragraph without any further explanation. The paragraph itself uses names $b$ and $c$ for arrays, which is obviously inconsistent with the names used in the code, and should be fixed to provide a better continuity.
  2. I'm not sure whether Python implementation is particularly useful. Was it tried on specific problems? How does it fare against C++ implementations? Sqrt decomposition often has a large constant time factor, and with Python it might be even worse...

@adamant-pwn
Copy link
Member

@A-stick-bug hi, do you plan any further work on this pull request?

@A-stick-bug
Copy link
Author

A-stick-bug commented Jan 5, 2024 via email

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 this pull request may close these issues.

None yet

2 participants