JavaScript implement Simple data structure , JSAN and JSunit Test
Simple data structure like stack, queue etc.. and its methods in JavaScript
Implement following basic data structures as library in javascript.
The data structure implement should be compliant format to JSAN ([login to view URL])
1. Stack
Implement Methods: push, pop, peek, empty, clear, search, size
Refer: for [login to view URL] javadoc for more detailed information
2. Queue
Implement Methods: Peek, Poll, odder, element , remove
Refer: [login to view URL] javadoc for more information
3. PriorityQueue
- 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: [login to view URL] javadoc for more information
4. Doubly Linked List
Implement Methods: add(object), clear, getFirst(), getLast(), remove( value), removeLast(), removeFist(), offer, insertAfter(object)
Refer: [login to view URL] javadoc for more information
5. Map
- Maps (ordered Binary Tree)
Method: insert(element), inorder, preorder, postorder, remove(element), haselement(element), clear(), size()
6. Set
Methods: add, contains, remove, size, clear, intersect, union, difference
Refer: [login to view URL] 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.
If there are any queries or question, please feel free to contact me directly. A good java script worker can finish the above job in not more than one day. I am flexible with time period. This exercise is just a test since; we are looking for worker on big project that we can [login to view URL] can also integrate the HTML with Javascript.
For reference [login to view URL]
[login to view URL]
Hi, I am a computer science engineering student. I have just studied and been tested on all the required data structures (and some others). I think I would perfectly suit this job and the long term project that you have in the pipeline. Please see my PM for more details.