Criteo services may compare sorted identifier lists when processing audience or Retail Media matching results. Given two sorted lists of integers, return their intersection as a sorted list containing each common value only once.
Implement intersection_sorted_lists(nums1, nums2). The inputs are two non-decreasing lists of integers. Return a new list of integers containing every distinct value that appears in both inputs, in ascending order. Do not modify either input list.
Duplicate occurrences in either input must appear only once in the result. If the lists have no common value, return an empty list.
def intersection_sorted_lists(nums1, nums2):