Public
Edited
Dec 7, 2023
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
AOC.resultTable(meta)
Insert cell
part1 = (s) => s.length
Insert cell
Insert cell
part2 = (s) => s.length
Insert cell
data = parse(which === "test1" ? test1 : input)
Insert cell
parse = (s) =>
s
.trim()
.split("\n")
.map((l) => {
const h = l.split(" ");
return { hand: h[0], bid: +h[1] };
})
Insert cell
Insert cell
Insert cell
inputs = ({
test: test1,
real: input
})
Insert cell
meta = AOC.meta({
day: 7,
year: 23,
title: "Camel Cards",
parse,
inputs,
parts: [part1, part2],
expected: { test: [6440, 5905], real: [249748283, 248029057] },
href: "https://observablehq.com/@a1ip/aoc-2023-day-7"
})
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more