feat(day_6): part A done and B tried with dirty strategy

This commit is contained in:
2025-12-07 00:20:51 +01:00
parent 25ef72e561
commit ffe074001a
5 changed files with 202 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { assertEquals } from "@std/assert";
import {
operate,
read_problems,
read_problems_as_cephalopod,
} from "../exercises/day_6.ts";
Deno.test("Day 6 - A", async () => {
const problem_list = await read_problems(
"src/exercises/assets/day_6_test_input.txt",
);
const result = operate(problem_list);
assertEquals(result, 4277556);
});
Deno.test("Day 6 - B", async () => {
const problem_list = await read_problems_as_cephalopod(
"src/exercises/assets/day_6_test_input.txt",
);
const result = operate(problem_list);
assertEquals(result, 3263827);
});