adding functionality to CollectionsHelper, implementing HeapSort