ptnk304's blog

By ptnk304, history, 9 years ago, In English

I am wondering which is the most efficient way (minimal time complexity) to implement a heap (say heap-min). Heap mentioned here means a data structure letting us perform insertion, deletion and retrieving the minimum value on a collection of data.

  • Vote: I like it
  • -5
  • Vote: I do not like it

| Write comment?
»
9 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Binary heap stored as an array. Every other choice is slower and harder to write (only for these operations).