Click here to see the full article post
I think we should address the second solution's core idea: greedy, rather than just pasting code and a small introduction what does the loop do
Could you explain the case, What if the requirement is like this nums < nums > nums < nums ....?
Yeah, Actually I am having trouble to solve it in place. Could you help me on Wiggle Sort II?
@1337c0d3r Thanks :)
Thanks for the analysis. I have a question, I tried to run all your solutions with this test case [1,2,2,1,2,1,1,1,1,3,2,2] but they produce the in correct result.
Ideally, it should show the result as [1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2] but it does not. Can you comment on this test case?
@hieu.trinh You are saying Wiggle Sort II. See the comments of ashiqimran and of 1337c0d3r.
@rbacevedo No you didn't. Don't lie.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.