Salesforce Interview Question

Delete duplicate element in a Linked List

Interview Answer

Anonymous

Jul 17, 2017

Sort the list (merge sort is optimal as you do not need extra space for lists) compare adjacent elements from left to right until you find duplicates.