-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
beginner-friendlyEasy to implementEasy to implementbugSomething isn't workingSomething isn't workinghelp wantedNeeds to be worked onNeeds to be worked on
Description
Hello!
From the comments on the wiggle sort code I got that it is intended to sort an array arr like this:
a[0] <= a[1] >= a[2] <= a[3] >= a[4] <=...
I tested the code using an array [3, 5, 6, 1].
I got [3, 6, 5, 1], which is not fulfilling the condition stated above.
There are possible solutions for this case, for example [3, 5, 1, 6].
If this is an error I would like to try and fix it. If it is not, please reply, so I might learn what I misinterpreted.
Metadata
Metadata
Assignees
Labels
beginner-friendlyEasy to implementEasy to implementbugSomething isn't workingSomething isn't workinghelp wantedNeeds to be worked onNeeds to be worked on