Skip to content

Drop point-update sparse segment tree from the PDF - #22

Draft
frex-e wants to merge 2 commits into
mainfrom
cursor/drop-point-sparse-segtree-82e2
Draft

Drop point-update sparse segment tree from the PDF#22
frex-e wants to merge 2 commits into
mainfrom
cursor/drop-point-sparse-segtree-82e2

Conversation

@frex-e

@frex-e frex-e commented Aug 17, 2026

Copy link
Copy Markdown
Owner

The point-update implicit tree (SparseSegmentTree.h) is not needed in the printed notebook.

SparseLazySegmentTree already does point updates as a degenerate range (ql == qr). Offline, coordinate compression plus the dense SegmentTree / Fenwick covers the same “sparse indices” case. Four segment trees is a lot of column for 25 pages; this is the same reason UnionFind stays commented out next to UnionFindRollback.

The header and its stress test stay in the repo. The snippets site hides it by default (show-excluded toggle), same as other PDF-excluded snippets. The lazy tree description now notes the ql=qr point-update usage, and the lazy stress test covers a point update on a large domain.

Walkthrough

  • Comment out \kactlimport{SparseSegmentTree.h} in the data-structures chapter.
  • Document point updates on SparseLazySegmentTree.
  • Stress-test ql=qr on the lazy implicit tree.
  • Note the PDF exclusion in fork / mine-integration docs.

Verified: make test-compiles (144/144), make test (90/90), make test-preprocess, make web-pdf.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 17, 2026 14:23
SparseLazy already covers point updates as a degenerate range (ql=qr),
so the extra implicit tree is not worth a column in the 25-page notebook.
Keep the header in-repo (site toggle) like UnionFind.

Co-authored-by: shadeditor <shadeditor@gmail.com>
ql=qr is the replacement for the PDF-excluded point-update implicit tree.

Co-authored-by: shadeditor <shadeditor@gmail.com>
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.

2 participants