문제

I am a mechanical student and I have changed my field to Computers. Need to get through the algorithms class. This question is one of the exercise questions

  1. If the max heap algorithm's running time is O(klogn) then is there any algorithm which has better running time than this?
도움이 되었습니까?

해결책

  1. Print and remove the root k times;
  2. O(k log n);
  3. Yes.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top