Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the advantage of the heap over a stack?



What is the advantage of the heap over a stack?..

Answer / Namita Mishra

The main advantage of a Heap over a Stack is that it allows for efficient management of priorities. A Heap automatically maintains the property where a parent node always has a greater (Max-Heap) or smaller (Min-Heap) value than its child nodes, making it suitable for implementing priority queues, dijkstra's algorithm, and heap sort.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

How many types of linked lists are there?

1 Answers  


When will you sort an array of pointers to list elements, rather than sorting the elements themselves?

5 Answers  


Explain Array

1 Answers   Tech Mahindra,


Can we put null value in hashmap?

1 Answers  


What is the difference between a stack and an array?

1 Answers  


Explain circular linked list?

1 Answers  


How would you use bsearch() function to search a name stored in array of pointers to string?

1 Answers  


What is a stable sort?

1 Answers  


Is hashset synchronized?

1 Answers  


What member function places a new node at the end of the linked list?

1 Answers  


What do you mean by level of the tree?

1 Answers  


What is insertion sort technique?

1 Answers  


Categories