def test__AVLTree__right_rotate4(): rotated = AVLTree() rotated.root = AVLTree._right_rotate(avltree4.root) print('avltree4=', avltree4) print('rotated=', rotated) assert rotated.is_bst_satisfied() assert rotated.to_list('inorder') == avltree4.to_list('inorder')
def test__AVLTree__right_rotate3(): rotated = AVLTree() rotated.root = AVLTree._right_rotate(avltree3.root) assert rotated.is_bst_satisfied() assert rotated.to_list('inorder') == avltree3.to_list('inorder')