heap question

    Date: 06/22/06 (Algorithms)    Keywords: no keywords

    So recently I learned about heaps, that is, a tree structure in which the two children of a node are smaller than that particular node. Therefore when inserting an item into the heap, the maximum time is log2 n, where n is the number of nodes in the tree.

    I was wondering why heaps are designed with two children per node, as opposed to say, three, or four, or five. It seems like the efficiency could then be improved because the log base would be higher. I'm sure there's a good reason why it's two children and not more. But I don't know what it is...

    Source: http://community.livejournal.com/algorithms/78910.html

« Towers of Hanoi || Knuth Sorting and Searching »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home