Linkedlist deletion

Please help me with the code along with the approach for the below question
Q—> linked list deletion of last most frequently occurring node