Created
February 18, 2022 19:12
-
-
Save maxgoren/469a709a01128c3ac5f316df4bebed64 to your computer and use it in GitHub Desktop.
deletemin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Node<K,V> getMin(Node<K,V> h) | |
{ | |
if (h.leftChild() == null) | |
return h; | |
return getMin(h.leftChild()); | |
} | |
private Node<K,V> deleteMin(Node<K,V> h) | |
{ | |
if (h.leftChild() == null) | |
return h.rightChild(); | |
h.setLeft(deleteMin(h.leftChild())); | |
return h; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment