You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compared to the Lazy Segment Tree, the Segment Tree template is very beginner friendly.
The three lines you have to change to alter the behaviour of the tree are adjacent, and you don't have to understand the rest of the code to make those changes.
The Lazy Segment Tree template does not have this nice property.
Making that tree compute e.g. sums instead of maximums requires tricky changes in multiple places.
If you know how these trees work you might be able to do it, but otherwise it's basically impossible.
It's probably not possible to make it as nice to modify the behaviour as it is in the ordinary Segment Tree, but a little help can go a long way. 🙂
I don't have a concrete idea for how to improve it (which is why I'm submitting an issue instead of a pull request), but maybe we can discuss.
I know that beginner-friendliness is not a primary goal of kactl, but it may be possible to improve it without sacrificing the other goals.
The text was updated successfully, but these errors were encountered:
Compared to the Lazy Segment Tree, the Segment Tree template is very beginner friendly.
The three lines you have to change to alter the behaviour of the tree are adjacent, and you don't have to understand the rest of the code to make those changes.
The Lazy Segment Tree template does not have this nice property.
Making that tree compute e.g. sums instead of maximums requires tricky changes in multiple places.
If you know how these trees work you might be able to do it, but otherwise it's basically impossible.
It's probably not possible to make it as nice to modify the behaviour as it is in the ordinary Segment Tree, but a little help can go a long way. 🙂
I don't have a concrete idea for how to improve it (which is why I'm submitting an issue instead of a pull request), but maybe we can discuss.
I know that beginner-friendliness is not a primary goal of
kactl
, but it may be possible to improve it without sacrificing the other goals.The text was updated successfully, but these errors were encountered: