heap
n-largest elements in a sequence (need to retain duplicates)
I need to find the n largest elements in a list of tuples. Here is an example for top 3 elements. # I have a list of tuples of the form (category-1, category-2, value)[详细]
2023-03-20 00:51 分类:问答How to delete from a Max-Heap?
If we put 15 in the root, what would be the process of heapify? 85 /\\ /\\ /\\ 5570 /\\/\\ /\\/\\ 22333065 /\\/[详细]
2023-03-18 23:35 分类:问答Largest Item in Heap
The largest item in a heap must appear in position 1, and the second largest must be in position 2 or position 3. Give the list of positions in a heap of size 31 where the[详细]
2023-03-16 01:13 分类:问答What does it actually mean by different heap-operations?
There are various heap-operations and various names are given to some same operations. I am overwhelmed by the names and aliases.[详细]
2023-03-15 18:12 分类:问答max heapify algorithm from Cormen with zero-indexing
I am trying to implement max heapify algorithm given in Algorithms Book here The algo in book is MAX-HEAPIFY(A,i)[详细]
2023-03-14 14:30 分类:问答Is there a standard Java implementation of a Fibonacci heap?
I was looking at the different kind of heap data structures. The Fibonacci heap seems to have the better worst case complexity for (1) insertion, (2) deletion and (2) f开发者_Python百科inding the mi[详细]
2023-03-11 22:12 分类:问答Building a valid heap
I just need some verification on whether or not I\'m doing this correctly. I checked the wiki for a heapsort, but it seems in the animation to build the heap it inserts the numbers into the nodes and[详细]
2023-03-10 08:33 分类:问答How can I configure std::priority_queue to ignore duplicates?
How can I configure std::priority_queue to ignore duplicates? When I add a key that is already contained then this new one should be ignored. (In my case, the priority for the old and the new one wil[详细]
2023-03-05 02:48 分类:问答Deletion in Heap with parent pointers in O(1) time?
So here\'s the question: Suppose as min heap uses parent pointers such that each node contains a pointer to its parent and the root has a null pointer. Given a pointer to the node, which isn\'t the ro[详细]
2023-03-04 20:07 分类:问答How to handle heaps in C++
I know this is probably one of those \"you just have to try it\" kind of questions, but since I do not have ac开发者_开发问答tual test data available yet, I\'d like to get some input on your experienc[详细]
2023-03-03 18:32 分类:问答
加载中,请稍侯......