Trace through the following code for adding a new element to the beginning of a linked list. Assume the value of the element parameter is Peter.
class List
{
public:
. . .
void push_front(string element);
. . .
};
void List::push_front(string element)
{
Node* new_node = new Node(element); ➊ ➋ ➌
new_node->next = first; ➍
if (first != nullptr) { first->previous = new_node;} ➎
else { last = new_node; }
first = new_node; ➏
}