Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the linked list, still sorted.
Note: For this problem, linked lists are represented as arrays for simplicity. The function takes the sorted list as an array and should return the deduplicated sorted array.