__init__: Does not take in any input]
Initializes a bridges instance
insert: Take in key and value as the input
Automatically balance the tree upon insertion
Create an AVL tree element, put in balance factor, balance tree
visualize: Does not take in any input
Just call bridges.visualize()
Create
class AVLTree
with following methods:__init__
: Does not take in any input] Initializes abridges
instanceinsert
: Take inkey
andvalue
as the input Automatically balance the tree upon insertion Create an AVL tree element, put in balance factor, balance treevisualize
: Does not take in any input Just callbridges.visualize()