-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 sqrt decomposition #613
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment is a test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please read our contribution guidelines. I have reviewed this but I was going to avoid it reviewing this PR because there is no context provided on what you're trying to do and achieve in this PR. You are expecting the maintainers to spend time figuring out most of your code when you haven't even provided a decent description (no description in fact). Just opening a PR without description is not a very good way of contributing to projects.
I noticed that in another pr somedid did heap, so I removed it. I also added a description at this pr |
I fixed the style |
structure/sqrtdecompositionsimple/sqrtdecompositionsimple_test.go
Outdated
Show resolved
Hide resolved
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
(comment to not close this) I wish I can work on this when I have time |
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
(comment to not close this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Don't forget to re-request a review once you are done with the changes :) |
I tried to do little fixes on comments, and moved to a new folder called sqrt, it may contains in future others algorithms/data structures which use "sqrt advantages", for example mo's algorithm |
What should I do? |
@tjgurwara99 could you review again? |
I haven't forgotten this PR - I will review as soon as I get some time 🙏🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than those two things, everything else looks good to me. You can also feel free to ignore it since it's an opinions related comment, in which case let me know and I'll approve it 😄
I did a little naming fix, but not the ones you exposed. FInally I think we have 2 choices: Let the name as it is, or call it like "BaseDS" (base data structure), what do you like more? |
With all this effort in this conversation can be built tens of sqrt decompositions xd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The choice of naming is unfortunate and that can also be said to be true for quicksort
hence we also made an exception there as well, so don't worry too much about naming 😄 It was just a suggestion because I rarely come across these sqrt decomposition based data structures so I know very little about them. My only concern was convention so I suggested it but otherwise it looks good.
Added the data structure like the one described here (not including mo's algorithm) https://cp-algorithms.com/data_structures/sqrt_decomposition.html.
But I made it more general as possible, using generic functions to query, merge 2 queries, and change the value of an element