Platform
Resources
Pricing
Sign in
Get started
Visnu Pitiyanuvath
Workspace
Fork
Public
Advent of Code 2021
By
Visnu Pitiyanuvath
Edited
Nov 22, 2022
2 stars
Advent of Code 2021
Advent of Code Leaderboard 2021
Day 1: Sonar Sweep
Day 2: Dive!
Day 3: Binary Diagnostic
Day 4: Giant Squid
Day 5: Hydrothermal Venture
Day 6: Lanternfish
Day 7: The Treachery of Whales
Day 8: Seven Segment Search
Day 9: Smoke Basin
Day 10: Syntax Scoring
Day 11: Dumbo Octopus
Day 12: Passage Pathing
Day 13: Transparent Origami
Day 14: Extended Polymerization
Day 15: Chiton
Day 16: Packet Decoder
Day 17: Trick Shot
Day 18: Snailfish
Insert cell
Insert cell
Plot
.
lineY
(
input
)
.
plot
(
{
width
}
)
Insert cell
increasing
=
(
input
)
=>
input
.
map
(
(
n
,
i
,
all
)
=>
(
i
>
0
?
all
[
i
]
>
all
[
i
-
1
]
:
null
)
)
.
filter
(
(
d
)
=>
d
)
.
length
Insert cell
part1
=
increasing
(
input
)
Insert cell
part2
=
increasing
(
input
.
map
(
(
n
,
i
,
all
)
=>
i
<
all
.
length
-
2
?
all
[
i
]
+
all
[
i
+
1
]
+
all
[
i
+
2
]
:
null
)
.
filter
(
(
d
)
=>
d
!==
null
)
)
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
increasing
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
part1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
part2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
test
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
input
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML