Find the Kth Largest Element in Two Sorted Arrays

Given two integer arrays a and b, each sorted in nondecreasing order, and an integer k, return the k-th largest element in their merged sorted order, using 1-based k.

Implement an algorithm...

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: