Delete all the nodes on right

if (current.next.data < maxnode.data) {
temp = current.next;
current.next = temp.next;
temp = null;
}
Can you explain me this part of the code.

hi @dips123deepali_c25f140838182212
kindly share the whole code…

hi @dips123deepali_c25f140838182212
shall i consider ur doubt as resolved as I haven’t heard back from u for a long time…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.