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
Shortest range in k sorted arrays/lists is the standard problem you are looking for, here is it's solution.
May be you are looking for this answer : https://www.geeksforgeeks.org/find-smallest-range-containing-elements-from-k-lists/ .
It's not contributed to me, I just found this on geeksforgeeks while searching for the same thing as you.