From 217761b6adaeaf1a56f92abad65da9b75dd9f6ea Mon Sep 17 00:00:00 2001 From: Tanishq Dubey Date: Mon, 5 Dec 2022 00:47:35 -0500 Subject: [PATCH] cleanup --- day5/solution.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/day5/solution.ts b/day5/solution.ts index 924bbd1..0bf953d 100644 --- a/day5/solution.ts +++ b/day5/solution.ts @@ -10,6 +10,7 @@ function transpose(matrix) { const fileString = readFileSync(join(__dirname, "input"), 'utf-8'); const problemParts = fileString.split("\n\n"); + const rows = problemParts[0].split("\n"); var rotRows = []; for (const row of rows) { @@ -18,12 +19,8 @@ for (const row of rows) { rotRows.pop(); - -//rotRows = rotRows.map((_, index) => rotRows.map(row => row[index]).reverse()); rotRows = transpose(rotRows); - - rotRows = rotRows.map(element => { return element.map(val => { return val.trim();