Given k sorted arrays, select one element from each array such that the difference of maximum and minimum element of the selected elements is minimum

前端 未结 2 1065
抹茶落季
抹茶落季 2021-01-16 03:42

Given k sorted arrays, select one element from each array such that the difference of maximum element and minimum element of the selected elements is minimum. Example for k

2条回答
  •  余生分开走
    2021-01-16 04:34

    Shortest range in k sorted arrays/lists is the standard problem you are looking for, here is it's solution.

提交回复
热议问题