HubSpot may need to combine two already sorted HubSpot CRM activity streams and display only the earliest k activities. Given two ascending arrays, return the first k values from their sorted merge without sorting the full combined array.
Implement merge_until_k(list1, list2, k).
list1 and list2 are arrays of integers sorted in nondecreasing order.k is a nonnegative integer.k values from the merged sorted sequence.k values exist, return every available value.def merge_until_k(list1, list2, k):