Java Solution Binary Search Approach Used
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem.  \nBinary Search Approach
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. --> \nBinary Search Approach Used\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    \n     public long kthSmallestProduct(int[] nums1, int[] nums2, long k)\n    {\n        long si = -1000_000_0000l;\n        long ei = 1000_000_0000l;\n        long ans = 0;\n        while(si <= ei)\n        {\n            long mid = si + (ei - si) / 2;\n            long count = 0;\n            if(countofProduct(nums1,nums2,mid) >= k)\n            {\n                ans = mid;\n                ei = mid - 1;\n            }\n            else\n            {\n                si = mid + 1;\n            }\n\n\n        }\n\n        return ans;\n\n\n    }\n\n    private static long countofProduct(int[] nums1, int[] nums2, long prod)\n    {\n        long res = 0;\n        for(int e1 : nums1)\n        {\n            if(e1 >= 0)\n            {\n                int count = 0;\n                int low = 0;\n                int high = nums2.length - 1;\n                while (low <= high)\n                {\n                    int mid = low + (high - low) / 2;\n                    if((long) e1 * nums2[mid] <= prod)\n                    {\n                        count = mid + 1;\n                        low = mid + 1;\n                    }\n                    else {\n                        high = mid - 1;\n                    }\n                }\n                res += count;\n\n            }\n            else {\n                int count = 0;\n                int low = 0;\n                int high = nums2.length - 1;\n                while (low <= high)\n                {\n                    int mid = low + (high - low) / 2;\n                    if((long) e1 * nums2[mid] <= prod)\n                    {\n                        count = nums2.length - mid;\n                        high = mid - 1;\n                    }\n                    else {\n                        low = mid + 1;\n                    }\n                }\n                res += count;\n            }\n\n        }\n        return res;\n\n\n    }\n}\n```
['Java']