var array = Array.from({ length: 10000 }, () => Math.floor(Math.random() * 10000))
{"ScriptPreparationCode":"var array = Array.from({ length: 10000 }, () =\u003E Math.floor(Math.random() * 10000))","TestCases":[{"Name":"reverse","Code":"array.forEach(n =\u003E {\r\n const repeat = Math.sqrt(n);\r\n const result = [[], []];\r\n\r\n for (let i = 1; i \u003C= repeat; i\u002B\u002B) { \r\n if(n % i === 0) {\r\n result.push(i);\r\n if (i !== repeat) result.push(n / i);\r\n }\r\n }\r\n\r\n result.sort().reverse()[0];\r\n }\r\n)","IsDeferred":false},{"Name":"sort","Code":"array.forEach(n =\u003E {\r\n const repeat = Math.sqrt(n);\r\n const result = [[], []];\r\n\r\n for (let i = 1; i \u003C= repeat; i\u002B\u002B) { \r\n if(n % i === 0) {\r\n result.push(i);\r\n if (i !== repeat) result.push(n / i);\r\n }\r\n }\r\n\r\n result.sort()[result.length-1];\r\n }\r\n)","IsDeferred":false}]}