You are viewing a single comment's thread. Return to all comments →
let node = llist while(node != null) { if(node.next== null) { return llist } let firstNode = node.data let secondNode = node.next.data if(firstNode != secondNode) { node = node.next } if(firstNode == secondNode) { node.next = node.next.next } }
return llist
Seems like cookies are disabled on this browser, please enable them to open this website
Delete duplicate-value nodes from a sorted linked list
You are viewing a single comment's thread. Return to all comments →
return llist