You are given two sorted 0-indexed integer arrays nums1 and nums2, along with an integer k.
Consider all possible products formed by nums1[i] * nums2[j], where i ranges over all valid indices of nums1 and j ranges over all valid indices of nums2. Return the kth smallest product among all such pairs, using 1-based indexing.
Note: Both nums1 and nums2 are sorted in non-decreasing order. The arrays may contain negative numbers and zero, so the products can be negative, zero, or positive.
Constraints:
1≤ nums1.length, nums2.length ≤5×104
−105≤ nums1[i], nums2[j] ...