Added d-heap algorithm