Skip to content

Update 33.3.md - #570

Merged
walkccc merged 2 commits into
walkccc:mainfrom
jxu:patch-2
Nov 1, 2026
Merged

walkccc merged 2 commits into
walkccc:mainfrom
jxu:patch-2

Conversation

@jxu

@jxu jxu commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

33.3-6 incremental method using monotone chain algorithm

Overview of idea.

Usually I see the monotone chain alg presented as computing lower hull left-to-right and upper hull right-to-left, but the book description of incremental method seems to want one left-to-right pass, so both can be done simultaneously

jxu added 2 commits October 26, 2026 01:38
33.3-6 incremental method using monotone chain algorithm
@walkccc
walkccc merged commit 0f3fe62 into walkccc:main Nov 1, 2026
1 check passed
@walkccc

walkccc commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thank you for filling in this solution! Maintaining both chains in the same sorted pass gives the incremental method; each point is pushed and popped at most once per stack, so the scan is linear after sorting. Formatting, math checks, the strict MkDocs build, and PR CI pass. Merged: https://walkccc.me/CLRS/Chap33/33.3/#333-6.

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