{"ScriptPreparationCode":"function shuffle(array) {\r\n var currentIndex = array.length, temporaryValue, randomIndex;\r\n\r\n // While there remain elements to shuffle...\r\n while (0 !== currentIndex) {\r\n\r\n // Pick a remaining element...\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex -= 1;\r\n\r\n // And swap it with the current element.\r\n temporaryValue = array[currentIndex];\r\n array[currentIndex] = array[randomIndex];\r\n array[randomIndex] = temporaryValue;\r\n }\r\n\r\n return array;\r\n}\r\n\r\nvar sorted = [];\r\nvar shuffled = [];\r\nfor (var i = 0; i \u003C 1000; i\u002B\u002B) {\r\n sorted.push(\u0027a\u0027 \u002B i);\r\n shuffled.push(\u0027a\u0027 \u002B i);\r\n}\r\n\r\nshuffled = shuffle(shuffled);\r\n\r\n","TestCases":[{"Name":"Sort the sorted","Code":"var s2 = sorted.sort();","IsDeferred":false},{"Name":"Sort the shuffled","Code":"var s2 = shuffled.sort();","IsDeferred":false}]}