Your question is Unique Elements From Two Sorted Arrays. 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.
FuboTV receives two sorted lists of content IDs from different catalog feeds. Return the values that appear in exactly one list, preserving ascending order.
Implement unique_elements(first, second) using the sorted order to achieve linear time. Each input list contains distinct integers, and the output must also be sorted with no duplicates.
first and second, sorted in strictly increasing order.def unique_elements(first, second):