Writing an application: Where in I need to maintain an data structure 'X-Files' which stores a number of objects and supports following functionalities:
- Pop - Remove the object with the least value (one of the object attributes named - 'Area51' )
- Push - Insert the object into the data structure
- Check - Whether the given object is in the Data structure 'X-Files'
- Update - Update the contents of the object (Involves updating the attribute 'Area51' and its guaranteed that update will be strictly to lower value than current value)
What would be most appropriate data structure to support these requirements?
Aucun commentaire:
Enregistrer un commentaire