Find Kth Largest Element in Two Sorted Arrays

Given two sorted arrays A and B with N and M elements, respectively, find the k-th largest element, where k is significantly smaller than N + M.

Example

Suppose A = [1, 3, 5], B = [2, 4, 6], k =...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: