Solve 2024-23

This commit is contained in:
2024-12-23 13:17:53 +01:00
parent fd01ee545e
commit 7feb72b51a
5 changed files with 146 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
import { describe, expect, it } from 'bun:test';
import { solveFirst, solveSecond } from './index.ts';
describe('2024-23', () => {
const testInput = `kh-tc
qp-kh
de-cg
ka-co
yn-aq
qp-ub
cg-tb
vc-aq
tb-ka
wh-tc
yn-cg
kh-ub
ta-co
de-co
tc-td
tb-wq
wh-td
ta-ka
td-qp
aq-cg
wq-ub
ub-vc
de-ta
wq-aq
wq-vc
wh-yn
ka-de
kh-ta
co-tc
wh-qp
tb-vc
td-yn`;
it('first', () => {
expect(solveFirst(testInput)).toBe(7);
});
it('second', () => {
expect(solveSecond(testInput)).toBe('co,de,ka,ta');
});
});