Skip to content

feat: add lazy segment tree implementation#3119

Open
YassaTalaat80 wants to merge 2 commits intoTheAlgorithms:masterfrom
YassaTalaat80:feat/lazy-segment-tree
Open

feat: add lazy segment tree implementation#3119
YassaTalaat80 wants to merge 2 commits intoTheAlgorithms:masterfrom
YassaTalaat80:feat/lazy-segment-tree

Conversation

@YassaTalaat80
Copy link
Copy Markdown

Description

This PR adds a implementation of a Lazy Segment Tree to the data_structures directory. It supports range updates and range queries in O(log N) time using lazy propagation.

Changes Made:

  • Implemented a templated LazySegmentTree class to support various data types
  • Added a Node struct to safely encapsulate segment values and lazy flags.
  • Included comprehensive automated tests using assert() to verify build, update, and query operations.

Testing

  • Code compiled successfully...
  • Formatted code...
  • All automated self-tests passed locally.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Author has not responded to the comments for over 2 weeks label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Author has not responded to the comments for over 2 weeks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant