I'm trying to make an interval tree from some boilerplate red-black-tree code. To make an augmented red-black-tree that supports intervals (as described in Wikipedia) you need to augment it to store that max value of any range of any child. I understand how I can annotate each node when inserting as it's a simple compare and update, but I'm stuck blocked based on how to properly handle rotations. (At least I think that's my problem)
All the tutorials and videos kinda hand wave and say "update the annotation on rotation". Any tips, resources, or code (pseudo or otherwise) to see how an insertion/deletion with augmentation this is done?