Skip to content

Instantly share code, notes, and snippets.

@maxgoren
Created February 18, 2022 19:12
Show Gist options
  • Save maxgoren/469a709a01128c3ac5f316df4bebed64 to your computer and use it in GitHub Desktop.
Save maxgoren/469a709a01128c3ac5f316df4bebed64 to your computer and use it in GitHub Desktop.
deletemin
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