Skip to content

ksouthern/binary_trees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Binary and AVL_trees

binary_tree.py contains an implementaiton of a binary tree, at the bottom of the file are some functions that need implementing to turn the binary tree into an AVL_tree

testing.py is what I've been using to run the code and it displays the trees.

I've based the binary tree implementation on this one: https://github.com/laurentluce/python-algorithms/blob/master/algorithms/binary_tree.py

I've extended it to AVL trees using: https://www.geeksforgeeks.org/avl-tree-set-1-insertion/

Instructions: 1)Add parents to the class

2)Extend insert and delete to add/remove parents

3)Implement rotate_right and rotate_left

About

AVL_trees

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages