ValidNumber and RemoveDuplicatesfromSortedListII