Given the head of a sorted linked list, delete all nodes that have duplicate values, leaving only values that appear exactly once in the original list. Return the resulting list as an array.
Input: A sorted array of node values.
Output: Array — values appearing exactly once.
Input: [1,2,3,3,4,4,5]
Output: [1,2,5]
Explanation: 3 and 4 removed entirely.Input: [1,1,1,2,3]
Output: [2,3]
Explanation: All 1s removed.Input: [1,2,3]
Output: [1,2,3]
Explanation: No duplicates.0<=n<=300sorted ascending