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
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