Solve 2025-11

This commit is contained in:
2025-12-11 13:21:56 +01:00
parent 204e42236e
commit 3e3806c1b9
4 changed files with 104 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import { describe, expect, it } from 'bun:test';
import { solveFirst, solveSecond } from './index.ts';
describe('2025-11', () => {
it('first', () => {
const testInput = `aaa: you hhh
you: bbb ccc
bbb: ddd eee
ccc: ddd eee fff
ddd: ggg
eee: out
fff: out
ggg: out
hhh: ccc fff iii
iii: out`;
expect(solveFirst(testInput)).toBe(5);
});
it('second', () => {
const testInput = `svr: aaa bbb
aaa: fft
fft: ccc
bbb: tty
tty: ccc
ccc: ddd eee
ddd: hub
hub: fff
eee: dac
dac: fff
fff: ggg hhh
ggg: out
hhh: out`;
expect(solveSecond(testInput)).toBe(2);
});
});