OpenAI interview hard question
4757

https://leetcode.com/problems/largest-local-values-in-a-matrix However, the size of matrix can be k instead of 3.

The best I can think of is O(n^2logn).

I tried to get O(n^2) but using a dequeue to do sliding window max however handling the order from both going left -> right and top -> down seem to be a challenge.

Anyone has a better solution in mind?

Comments (2)