{"ScriptPreparationCode":"var input = [];\r\narrayLenght = 1000\r\nfor (var i = 0; i \u003C 1000; i\u002B\u002B) {\r\n input[i] = Math.round(Math.random() * 1000000);\r\n}","TestCases":[{"Name":"Built in","Code":"\r\nvar arr1 = []\r\n\r\nfor (var i = 0; i \u003C arrayLenght; i\u002B\u002B) {\r\n arr1.push(input[i])\r\n arr1.sort((a, b) =\u003E a - b)\r\n}","IsDeferred":false},{"Name":"Insertion Sort","Code":"var arr2 = []\r\n\r\nfor (var i = 0; i \u003C arrayLenght; i\u002B\u002B) {\r\n var addedElement = false\r\n for (var j = 0; j \u003C arr2.length; j\u002B\u002B) {\r\n if (arr2[j] \u003E= input[i]) {\r\n arr2.splice(j, 0, input[i]);\r\n addedElement = true;\r\n break;\r\n }\r\n }\r\n if (!addedElement) {\r\n arr2.push(input[i])\r\n }\r\n}","IsDeferred":false}]}