LinkedIn | Smallest K Products of Two Sorted Array

Given two sorted integer arrays, find the smallest k products of the two arrays.

Example 1:

Input: arr1 = [-2, -1, 0, 1, 2], arr2 = [-3, -1, 2, 4, 5], k = 3
Output: [-10, -8, -6]
Explanation: -2 * 5, -2 * 4, 2 * -3
Comments (8)