Solve 2025-11
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user