{"ScriptPreparationCode":null,"TestCases":[{"Name":"Nested Loops","Code":"function steps(n) {\r\n for (let row = 0; row \u003C n; row\u002B\u002B) {\r\n let stair = \u0022\u0022;\r\n for (let column = 0; column \u003C n; column\u002B\u002B) {\r\n if (column \u003C= row) {\r\n stair \u002B= \u0022#\u0022;\r\n } else {\r\n stair \u002B= \u0022 \u0022;\r\n }\r\n }\r\n console.log(stair);\r\n }\r\n}\r\n\r\nsteps(4)","IsDeferred":false},{"Name":"Recursion","Code":"function steps2(n, row = 0, stair = \u0022\u0022) {\r\n if (n === row) {\r\n return;\r\n }\r\n\r\n if (n === stair.length) {\r\n console.log(stair);\r\n steps2(n, row \u002B 1);\r\n return;\r\n }\r\n\r\n if (stair.length \u003C= row) {\r\n stair \u002B= \u0022#\u0022;\r\n } else {\r\n stair \u002B= \u0022 \u0022;\r\n }\r\n steps2(n, row, stair);\r\n}\r\n\r\nsteps2(4)","IsDeferred":false}]}