Binary Search | Time: O(Nlog(R)log(M)) | Space: O(1)
Complexity\n- Time complexity: $O(N\log({R})\log({M}))$\n    - $N$: nums1.length\n    - $M$: nums2.length\n    - $R$: The range size of $nums1[i] * nums2[j]$\n 
# Complexity\n- Time complexity: $O(N\\log({R})\\log({M}))$\n    - $N$: nums1.length\n    - $M$: nums2.length\n    - $R$: The range size of $nums1[i] * nums2[j]$\n        - $-10^5 <= nums1[i], nums2[j] <= 10^5$\n        - $-10^{10} <= nums1[i] * nums2[j] <= 10^{10}$\n        - $R = 10^{10} - (-10^{10}) = 2(10)^{10} = 2e10$\n        - $\\log_2{R} = \\log_2(2e10) = 34.219 \\approx 35$\n- Space complexity: $O(1)$\n\n# Code\n```Typescript\nfunction kthSmallestProduct(nums1: number[], nums2: number[], k: number): number {\n    let min = -1e10;\n    let max = 1e10;\n\n    const negs = binarySearch(nums1, 0);\n    const zeroes = binarySearch(nums1, 1, negs) - negs;\n    while (min < max) {\n        const mid = min + Math.floor((max - min)/2);\n        if (k > check(nums1, nums2, negs, zeroes, mid)) {\n            min = mid + 1;\n        } else {\n            max = mid;\n        }\n    }\n\n    return min;\n};\n\nfunction binarySearch(arr: number[], target: number, min = 0, max = arr.length): number {\n    while (min < max) {\n        const mid = min + Math.floor((max - min)/2);\n        if (target > arr[mid]) {\n            min = mid + 1;\n        } else {\n            max = mid;\n        }\n    }\n    return min;\n}\n\nfunction check(nums1: number[], nums2: number[], negs: number, zeroes: number, x: number): number {\n    const N = nums1.length;\n    const M = nums2.length;\n    \n    // Process negatives\n    let i = 0;\n    let count = M * negs;\n    while (i < negs) {\n        count -= binarySearch(nums2, Math.ceil(x / nums1[i++]));\n    }\n\n    // Process zeroes\n    count += (x >= 0) ? M * zeroes : 0;\n    i += zeroes;\n\n    // Process positives\n    while (i < N) {\n        count += binarySearch(nums2, Math.floor(x / nums1[i++]) + 1);\n    }\n\n    return count;\n}\n```
['Binary Search', 'TypeScript', 'JavaScript']