[Java] Binary Search Approach
Thanks to @hdchen took reference from the solution and made a concise version of it.\n\nApproach\n Do Binary Search from negative limit -1e10 to positive limit 
Thanks to [@hdchen](https://leetcode.com/problems/kth-smallest-product-of-two-sorted-arrays/discuss/1524349/Java-Double-Binary-Search-O(log1010-x-MlogN)) took reference from the solution and made a concise version of it.\n\n**Approach**\n* Do Binary Search from negative limit `-1e10` to positive limit `1e10` for the value `val` from the first array\n* Do Binary search for the length of the second array from `0` to `nums2.length - 1`\n* Multiply the value each time with the mid value from the second array and see if its less that or greater and count `cnt` accordingly\n* Eventually the `k` smallest element will be found and the `lo` value will be returned\n\n```\nclass Solution {\n    public long kthSmallestProduct(int[] nums1, int[] nums2, long k) {\n        long lo = (long) -1e10; \n        long hi = (long) 1e10;\n        \n        while (lo < hi) {\n            long mid = lo + ((hi - lo) >> 1);\n            long cnt = 0;\n            \n            for (int val : nums1) \n                cnt += (val >= 0) ? binary_search(mid, val, nums2, true) : binary_search(mid, val, nums2, false);\n            \n            if (cnt >= k) hi = mid;\n            else lo = mid + 1;\n        }\n        return lo;\n    }\n    \n    public long binary_search(long mid, int i, int[] nums2, boolean positive){\n        int l = 0;\n        int r = nums2.length - 1;\n        int res = 0;\n        \n        while (l <= r) {\n            int c = l + ((r - l) >> 1);\n            long mul = i * (long) nums2[c];\n            if (mul <= mid) {\n                if (positive){\n                    l = c + 1;\n                    res = c + 1; \n                }\n                else{\n                    r = c - 1;\n                    res = nums2.length - c;\n                } \n            }\n            else{\n                if (positive) r = c - 1;                    \n                else l = c + 1;\n            }\n        }\n        return res;\n    }\n}\n```
['Binary Tree', 'Java']