Your question is Sorted Arrays Intersection. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
An Airtable automation compares sorted record-ID lists from multiple Airtable views. Given a list of sorted integer arrays, return the distinct values that appear in every array, in ascending order.
Implement intersect_sorted_arrays(arrays), where arrays is a list of arrays of integers. Each inner array is sorted in nondecreasing order and may contain duplicates. Return a new sorted list containing each common value exactly once. If arrays is empty, return an empty list. If any inner array is empty, no value can appear in all arrays, so return an empty list.
def intersect_sorted_arrays(arrays):