how to find the shortest array including middle 2 in n? Is it possible?
O(nlogn) does not necessarily imply that you have to use divide and conquer technique. All numbers in the array are positive. What does this tell you?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.