Vote count:
0
The question is this
Your task is to implement a heap that can work with any backing storage. Basically you need to take the abstraction one step down – for instance we use the heap without worrying about the backing storage simply because the interface is well defined. So you need to design an interface for the backing storage so that methods implementing the heap interface will work for any backing storage. Your code should be developed in Java and it should work for any data type that extends the comparable class. In this part you only need to worry about two backing storages; array and linked structure. You need to provide the implementation for the two backing storages as well.
I'm struggling to understand what exactly should be done here. What i get is, the interface should work regardless of the backing storage type (arrays/linked lists) How can i implement the interface without a specific backing storage? The interface should supposedly include the add and remove function. Hope someone could shed some light on this problem. Thank you
heap implementation that works with arrays or linked lists using java
Aucun commentaire:
Enregistrer un commentaire