Advent of Code is a series of small programming puzzles for a variety of skill levels. They are self-contained and are just as appropriate for an expert who wants to stay sharp as they are for a beginner who is just learning to code. Each puzzle calls upon different skills and has two parts that build on a theme.
Getting json into a java object from a web service is something that needs to be done all the time. This code makes it a little easier.
Rocks are falling from the sky! You get an
arrayof columns: rocks
Simulate rocks’ flight until they hit a platform, another rock or the bottom. Platforms stay put.
mapis an array in the format
maptranslates to the rock at
x: 2, y: 5
returnthe result after all rocks have stopped moving.