Given two sorted arrays of numbers, we want to find the pair with the kth largest possible sum. (A pair is one element from the first array and one element from the second
[2, 3, 5, 8, 13] [4, 8, 12, 16]
Merge the 2 arrays and note down the indexes in the sorted array. Here is the index array looks like (starting from 1 not 0)
[1, 2, 4, 6, 8] [3, 5, 7, 9]
Now start from end and make tuples. sum the elements in the tuple and pick the kth largest sum.