Array
2040. Kth Smallest Product of Two Sorted Arrays
Sorted arrays A and B (possibly with negatives) and a number k. Consider all products A[i]·B[j]; find the k-th smallest. Binary-search on the answer value: count how many products are ≤ mid and…
Loading…