You are viewing a single comment's thread. Return to all comments →
C#
public static Node removeDuplicates(Node head){ var current = head; while(current.next is not null) { if(current.data == current.next.data) { current.next = current.next.next; } else current = current.next; } return head; }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 24: More Linked Lists
You are viewing a single comment's thread. Return to all comments →
C#