Skip to main content

27 posts tagged with "C#"

View All Tags

· 3 min read

Another harder problem. The first part was pretty simple and didn't take me too much time to solve, but adapting for the second part of the problem took a lot more time.

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