Skip to content

Latest commit

 

History

History
4 lines (2 loc) · 460 Bytes

README.md

File metadata and controls

4 lines (2 loc) · 460 Bytes

TreeRotator -

LinkedBinaryTree.java is an implementation of a binary tree. Note that the rotate() method takes in a Position and rotates it with its parent. Two binary search trees on the same set of keys can be transformed into each other via a sequence of tree rotations. In the file TreeRotator.java, the printRotations() method prints out the sequence of keys corresponding to the nodes one needs to rotate to get from the first tree to the second tree.