UNPKG
expeditaet
Version:
latest (1.2.0)
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
Advent of Code Solutions
github.com/MariannaBoyle/expeditaet.git
MariannaBoyle/expeditaet
expeditaet
/
solutions
/
typescript
/
2022
/
06
/
src
/
p1.ts
8 lines
(5 loc)
•
265 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
import
{ task }
from
'@alexaegis/advent-of-code-lib'
;
import
packageJson
from
'../package.json'
;
export
const
p1 = (
input
:
string
):
number
=>
[...input].
slideWindow
(
4
).
findIndex
(
(
w
) =>
new
Set
(w).
size
===
4
) +
4
;
await
task
(p1, packageJson.
aoc
);
// 1876 ~0.54ms