Adam_Jardali's blog

By Adam_Jardali, 2 months ago, In English

Heap Sort

$$$Important$$$ $$$Note$$$: in this problem k is small as it is the min(n,1000). We should take advantage of this fact to solve the problem in an efficient way.

Solution Using Sorting
Solution Using Heap Sort
Solution Using Priority Queue

You Know Who

Hermione is busy now, So we need an efficient solution!

Solution
Code
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Adam_Jardali (previous revision, new revision, compare).

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Adam_Jardali (previous revision, new revision, compare).