Heaps
1
Name:
Anonymous
2008-10-22 16:11
Have you ever wondered why everyone creates heaps as arrays? It's because heaps are MP-complete.
2
Name:
Anonymous
2008-10-22 16:16
I implement my heaps with trees.
3
Name:
Anonymous
2008-10-22 16:19
>>2
This is fucking impossible. Post source code please.
4
Name:
Anonymous
2008-10-22 16:31
They're implemented so that all the elements are stored together in memory which improves performance because you have less cache misses.
5
Name:
Anonymous
2008-10-22 16:33
>>3
What do you mean it's impossible? You can use a tree to provide the same interface as an array by sorting on the order of insertion, therefore if you can use an array to implement a heap, you can use a tree.
6
Name:
Anonymous
2008-10-22 16:37
7
Name:
Anonymous
2008-10-22 16:50
8
Name:
Anonymous
2008-10-22 17:06
I implement my hash tables with trees.
9
Name:
Anonymous
2008-10-22 17:22
I implement my trees using hash tables.
10
Name:
Anonymous
2008-10-22 17:56
I implement my hash trieps with skip tables.
11
Name:
Anonymous
2008-10-22 18:24
I implement my functional heaps with skew binomial trees.
12
Name:
Anonymous
2008-10-22 18:32
I just start every program like this:
unsigned char local_storage[1048576*(1024*3)]
and then use that how I want it.
13
Name:
Anonymous
2008-10-22 19:57
I implement my fibonacci skip lists as unbalanced red-black heaps.
14
Name:
2010-09-09 12:06