{"ScriptPreparationCode":null,"TestCases":[{"Name":"row-major","Code":"let array2d = new Array(1000);\r\n\r\nfor (let i = 0; i \u003C array2d.length; i\u002B\u002B) {\r\n let arrayRow = [];\r\n for (let j = 0; j \u003C 1000; j\u002B\u002B) {\r\n arrayRow.push(j * i \u002B 1);\r\n }\r\n array2d[i] = arrayRow;\r\n}\r\n\r\nlet total = 0;\r\nfor (let i = 0; i \u003C array2d.length; i\u002B\u002B) {\r\n for (let j = 0; j \u003C array2d[i].length; j\u002B\u002B) {\r\n console.log(array2d[i][j]);\r\n total = total \u002B array2d[i][j];\r\n }\r\n}\r\nconsole.log(total);","IsDeferred":false},{"Name":"column-major","Code":"let array2d = new Array(1000);\r\n\r\nfor (let i = 0; i \u003C array2d.length; i\u002B\u002B) {\r\n let arrayRow = [];\r\n for (let j = 0; j \u003C 1000; j\u002B\u002B) {\r\n arrayRow.push(j * i \u002B 1);\r\n }\r\n array2d[i] = arrayRow;\r\n}\r\n\r\nlet total = 0;\r\nfor (let i = 0; i \u003C array2d.length; i\u002B\u002B) {\r\n for (let j = 0; j \u003C array2d[i].length; j\u002B\u002B) {\r\n console.log(array2d[j][i]);\r\n total = total \u002B array2d[j][i];\r\n }\r\n}\r\nconsole.log(total);","IsDeferred":false}]}