The data structure implement should be compliant format to JSAN (www.openjsan.org)
Implement Methods: push, pop, peek, empty, clear, search, size
Refer: for java.util.Stack javadoc for more detailed information
Implement Methods: Peek, Poll, odder, element , remove
Refer: java.util.Stack javadoc for more information
- Use same as Queue
- Create a constructor that take a comparator function which orders the elements appropriately as per the value in the queue.
Refer: java.util.PriorityQueue javadoc for more information
4. Doubly Linked List
Implement Methods: add(object), clear, getFirst(), getLast(), remove( value), removeLast(), removeFist(), offer, insertAfter(object)
Refer: java.util.LinkedList javadoc for more information
- Maps (ordered Binary Tree)
Method: insert(element), inorder, preorder, postorder, remove(element), haselement(element), clear(), size()
Methods: add, contains, remove, size, clear, intersect, union, difference
Refer: java.util.Set javadoc for more information
Once the above is implementing, just write JSunit Test case for each method
The JSUnit Test Case should have at least
1. One positive test case for each method.
2. One negative test case for each method.
For reference www.openJSAN.org