You are viewing a single comment's thread. Return to all comments →
My Swift Solution:
func removeDuplicates(head: Node?) -> Node? { guard let head = head else { return nil } if let next = removeDuplicates(head: head.next), head.data == next.data { head.next = next.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 →
My Swift Solution: