Skip to content

Lazy segment tree is difficult to modify for other operationsΒ #227

@IvanRenison

Description

@IvanRenison

The lazy segment tree of this is repo very useful when exactly the operations that it has are needed, but when other are needed it is difficult to modify because it is not very clear where the lazy values are propagated and where the operations are made.
In normal segment tree on the other hand is very easy to modify the operation because it is in a separate function.
I propose making a similar separation for lazy segment tree.
Probably it wold look something like this: https://github.com/IvanRenison/icpc-team-notebook-el-vasito/blob/update_STree_lazy/data_structures/segment_tree_lazy.cpp (note that that lazy segment tree is different because it is not lazy in memory allocation)

If you are interested in this improvement I can make it (including the tests) and send a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions