answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What is a real time example of heap?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is heap a real group?

yes it is.


What is Jenna Heap's mother's name?

her adoptive mother's name is Sarah Heap (adoptive father: Silas), but her real mother's name is Cerys (real father: Milo Banda).


What is the running time of transforming an arbitrary array into heap?

Building a heap from an arbitrary array takes O(n) time for an array of n elements.


What is an example of a real time cost?

example of data real time processing is to go shop and buy some of good another thing is to drink medical


What is a real time example of stack?

cars in garage


What is the real time example for Trojan horse?

yes


Is ATMs an example of real time processing?

yes


What is the difference between binary heap and binomial heap?

The difference between Binomial heap and binary heap is Binary heap is a single heap with max heap or min heap property and Binomial heap is a collection of binary heap structures(also called forest of trees).


What is real time software?

A real time software is one which are time based. For example : Railway reservation system, e-Banking etc.


How a heap is created?

You should know classes & pointers before heaps. My idea of a heap is a bit like this: You have a class or struct(i.g. Heap_t) with a pointer to another of itself, and some data. Example: class Heap_t{ public: Heap_t(){ Pointer=NULL; } Heap_t * point; int data; }; int main(){ //Variable Heap_t * heap;//This will hold a pointer to the root of the heap Heap_t tmp; //Temporary storage for a piece of the heap before it is added Heap_t * cur; //Temporary storage for the current piece of the heap //Setup the heap tmp.data=0;//Make data something meaningful cur=(Heap_t *) tmp;//Make the root of the heap heap=cur;//Backup the root of the heap //Make the heap big for(int i=1;i<10;i++){ tmp.data=i;//Make the data something meaningfull (*cur).next=(Heap_t *) tmp; //Add tmp to the heap } //Do stuff //Exit return(0); } You could also use a reference or use it without a pointer or a reference. This is a bit more like a linked list, but it is an example.


Real time example for double ended queue?

glass tumler


Difference between Fibonacci heap and binomial heap?

Both Binomial Heap and Fibonacci Heap are types of priority queues, but they have some differences in their structure and performance characteristics. Here's a comparison between the two: Structure: Binomial Heap: Binomial Heap is a collection of Binomial Trees. A Binomial Tree is a specific type of tree with a recursive structure. Each Binomial Tree in a Binomial Heap has a root node and may have children, where each child is also a root of a Binomial Tree of smaller size. Fibonacci Heap: Fibonacci Heap is a collection of trees, similar to Binomial Heap, but with more flexible tree structures. It allows nodes to have any number of children, not just two as in the Binomial Heap. The trees in a Fibonacci Heap are not strictly binomial trees. Operations Complexity: Binomial Heap: Binomial Heap supports the following operations with the given time complexities (n is the number of elements in the heap): Insertion: O(log n) Find minimum: O(log n) Union (merge): O(log n) Decrease key: O(log n) Deletion (extract minimum): O(log n) Fibonacci Heap: Fibonacci Heap generally has better time complexities for most operations (amortized time complexity). The amortized analysis takes into account the combined cost of a sequence of operations. For Fibonacci Heap (n is the number of elements in the heap): Insertion: O(1) Find minimum: O(1) Union (merge): O(1) Decrease key: O(1) Deletion (extract minimum): O(log n) Potential Advantage: Fibonacci Heap: The main advantage of Fibonacci Heap is that it allows constant-time insertion, decrease key, and deletion operations in the amortized sense. This makes it particularly useful in certain algorithms, such as Dijkstra's algorithm for finding the shortest path in a graph, where these operations are frequently used. Space Complexity: Binomial Heap: Binomial Heap usually requires more memory due to the strict structure of Binomial Trees. Fibonacci Heap: Fibonacci Heap can have better space complexity due to its more flexible structure, but this can vary depending on the specific implementation. Real-world Use: Binomial Heap: Binomial Heap is simpler to implement and may be preferred when ease of implementation is a concern. Fibonacci Heap: Fibonacci Heap's advantage in amortized time complexity makes it a better choice in scenarios where frequent insertions, deletions, and decrease key operations are expected. In summary, Binomial Heap and Fibonacci Heap are both priority queue data structures, but Fibonacci Heap offers better amortized time complexity for certain operations. However, Fibonacci Heap can be more complex to implement and may require more memory than Binomial Heap in some cases. The choice between the two depends on the specific use case and the performance requirements of the application.