Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save acceptable-security/69e5f5e3b0472b6b1997797b5c10739f to your computer and use it in GitHub Desktop.
Save acceptable-security/69e5f5e3b0472b6b1997797b5c10739f to your computer and use it in GitHub Desktop.
T1, T2, T3 and T4 are subtrees.
z y
/ \ / \
y T4 Right Rotate (z) x z
/ \ - - - - - - - - -> / \ / \
x T3 T1 T2 T3 T4
/ \
T1 T2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment