Remove First In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the body of removeFirst function. This function is supposed to add an element to the front of LinkedList. 3. If size of list is zero then return "ListIsEmpty: -1". 4. You are required to update head, tail and size as required. 5. Input and Output is managed for you. Just update the code in removeFirst function. Note -> Use the code snippet and follow the algorithm discussed in question video. The judge can't force you but the intention is to teach a concept. Play in spirit of the question.
0 <= N <= 10^6
input in managed for you.
output in managed for you.
addFirst 4 addFirst 4 addLast 5 addFirst 7 addLast 1 removeFirst removeFirst removeFirst removeFirst removeFirst removeFirst stop
7 4 4 5 1 ListIsEmpty: -1