We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de39f25 commit 28a01b4Copy full SHA for 28a01b4
1 file changed
Python/wiggle-sort.py
@@ -10,4 +10,5 @@ def wiggleSort(self, nums):
10
for i in xrange(1, len(nums)):
11
if ((i % 2) and nums[i - 1] > nums[i]) or \
12
(not (i % 2) and nums[i - 1] < nums[i]):
13
+ # Swap unordered elements.
14
nums[i - 1], nums[i] = nums[i], nums[i - 1]
0 commit comments