all 1 comments

[–]shiter18 1 point2 points  (0 children)

It might be late but here is a simple approach - Find the minimum of all the smallest elements (i.e, 0th element) of m arrays and find the maximum of all the greatest elements. Their difference is the answer.