Shortest Unsorted Continuous Subarray
@haruhiku I like you(joke) and esp u ANSWER!!! hhhh _
it's a easy question.
I Will choose the naïve solution. Awesome job
I think we don't need two loops, we can do it in one loop like this.
@i_square I appreciate you idea, and I think it is the best.
@alexander The first solution is easy to think of. And the second solution is awesome to solve problem in O(n) space and O(n) time. Thank you for your post!
@waigx I am in the same situation. Wondering if the runtime is related to condition of your computer...
@Hao-Cai Thank you ! that's really elaborate~It's an unique solution,I understand it completely ~
@kromah find the begin and end of the sub array
Thats smart ! is complexity O(n.logn)?
shorter writing style for same algorithm
No one has replied
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.