Question: Write in Java Netbeans In your favorite language with generics, write code for simple versions of the following abstractions: All the operations of each of
In your favorite language with generics, write code for simple versions of the following abstractions: All the operations of each of the abstractions must be implemented and executed interactively. You would need to execute the list function/method of each abstraction after each operation to show the change. 1. a stack, implemented as a linked list. 2. a priority queue, implemented as a skip list or a partially ordered tree embedded in an array. (create0, add(element), 3. a dictionary (mapping), implemented as a hash table. gkey) put(key,value), containsKey(key), removeKey(key) (create), push(item), pop0, peek0, empty0, searchlitem0), isEmpy0, list0 remove(element), peek0, size0, clear), contains(element), list0) keys0. size0, list0)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
