Given a linked list. Delete the first appearance of the given integer.
Definition of a single linked list:
Implement a function DeleteFirstElement that deletes the first appearance of element. If element is not in a list, do nothing. Function DeleteFirstElement must return the pointer to the head of updated list.
Let's delete element = 2. Function DeleteFirstElement returns the pointer to the head of updated list: