week 9 Flashcards
When Node to remove has both left and right subtree
sucessor can either be :
largest value in the left subtree or smallest value in right subtree
Binary Search Tree Removal william fiset
Do the last 2 Additional questions on the youtube video
From 12:20 onwards
The map ADT (get, put, remove)
get(k): if the map M has an entry e=(k,o) with key k,
return its associated value o; else, return null;
put(k,o): If M does not have an entry (k, o) then add
it to the map M and return null; else, replace with o
the existing value of the entry with key equal to k and
return old value associated with k;
remove(k): if the map M has an entry with key k,
remove it from M and return its associated value; else,
return null;
READ