mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-24 21:56:48 +08:00
sort/
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* eslint no-extend-native: ["off", { "exceptions": ["Object"] }] */
|
||||
Array.prototype.wiggleSort = function () {
|
||||
for (let i = 0; i < this.length; ++i) {
|
||||
const shouldNotBeLessThan = i % 2
|
||||
|
Reference in New Issue
Block a user