Remove an element from linked list problem solved