CSSE 230: LinkedLists Part 1
Implement the following methods from the Java LinkedList class.
If the linked list API specificies returning "null," for now, just
return -1.
All of the methods below should run in O(1) time.
- boolean add(int e)
- void addFirst(int e)
- void addLast(int e)
- void clear()
- int element()
- int getFirst()
- int getLast()
- boolean offer(int e)
- boolean offerFirst(int e)
- boolean offerLast(int e)
- int peek()
- int peekFirst()
- int peekLast()
- int poll()
- int pollFirst()
- int pollLast()
- int pop()
- void push(int e)
- int remove()
- int removeFirst()
- int removeLast()
- int size()