Yeah. Probably want a fibonacci heap or something similar.