In this post i'm gone explain liked list an famous leetcode problem that is "Remove Nodes from linked list".

Problem Statement:

You are given the head of a linked list.

Remove every node which has a node with a greater value anywhere to the right side of it.

Return the head of the modified linked list.