fireblade wrote: > Thank you very much. > Is there also anything for finding node in a heap > per given key?
Not with a binary heap. If you need a Find operation, you can use a balanced BST (or perhaps a splay tree). This requires O(log n) to insert rather than O(1) as for the binary heap and it's more complex, but that's the price for the greater flexibility. You could also maintain a hash in parallel with the binary heap to support Find. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
