Server Selection
Anonymous User
7840

image

Constraints
2 <= m <= n <= 1000

With the given constraints it looks there is an O(N^2) solution,
But I cannot figure out for the life of me on how to solve this question in O(m * n), any pointers will be greatly appreciated.
Needless to say I failed the OA.

Comments (5)