heap sort and avl tree