Skip to main content

· 2 min read

Today's problem came with a pretty complex explanation, but solving the first part was pretty simple. I created a MarbleGame class that dealt with the actual game mechanics. My solution was pretty straight forward by using a list to save the circle's state and loop through each marble. It worked pretty good for finding the solution for the first part of the problem.

· 2 min read

Nice little graph problem today. I started by creating a Step class which contained references to other steps it depended on. The first part was then solved by looping and flagging steps as completed until all step where completed. Finding the next step to complete simply involved a little LINQ to determine the first (considering a list of steps ordered alphabetically) incomplete step for which all its requirements are completed:

· One min read

This problem had me thinking a little more at the start, especially in how should I determine if a location's area is finite or not. I ended up calculating the areas of each location by going through each possible coordinate in the map and finding the closest location to it, then if a location's area contained a coordinate on the border of the map, that location's area should be infinite.