Advent of code. Advent Of Code 2018 2018-08-25

Advent of code Rating: 6,6/10 1455 reviews

Advent of Code, Data Structures, and Hidden Complexity

advent of code

Note that I am not filtering the repos by activity, so some of them could very well have been created for a few days only. To get the first time the frequency repeats, include a predicate where the first and last are not the same row. Ruby, Go and C are also not surprising entries on this list, but and are to me. If you'd like to support Advent of Code, please share it with all your friends, even the ones that are just learning to code! You can use your string splitter of choice here. There are many ways to tackle this as well, but I will handle anagrams by sorting the letters in each word first, and then running the bit from part 1 to identify repeated words. In an effort to stretch my programming muscles, I'm doing the in a language new to me: Python. When there are open freecells, it is possible to move multiple cards using one mouse operation as a shortcut to doing all the card moves individually.

Next

Advent of Code: Day 4 » mixedmath

advent of code

I did end up making it work, though, using strictly sequential Futhark. The device is showing a set of changes in frequency — in both positive and negative changes. It's important that students learn about this and it appears that many don't. Here are some other unexpected examples. The challenge The Elves managed to locate the chimney-squeeze prototype fabric for Santa's suit. Thank you for this separate space.

Next

Advent of Code: Most Popular Languages

advent of code

Since it starts at zero, it is possible that the first repeated frequency is zero. These puzzles are nicely arranged in the format of a Christmas tree. I would say this should be faster because creating the dictionary has a lower complexity than ordering the letters in the word. Also note that in your original class you defined class variables that were overriden in the constructor. Last week the challenge, a series of fun programming challenges, one for each day of the month. I find interesting to reflect on the fact that Jenny Bryan says that the challenge is best for C or C++, that are not the most popular languages in these samples… but still more popular than R, ok. Those got lost, and there was no good way to really talk about it.


Next

Futhark 0.8.1 released, with reflections on Advent of Code

advent of code

We supported each other without judgement. The example above provides the way the input is formatted. Such matrix should not be pre-allocated and allowed to be arbitrarily large if need be. For such cases, the collections module features two helpful classes: defaultdict and Counter. Determine how many strings have no duplicate words, even after anagramming. You can ask for help, talk with each other about their solutions, etc.

Next

haskell

advent of code

If you really want to show your appreciation, donations are always appreciated. If you could help the rest of us out and make it so we can see the code and run the code, that would be great. So I decided to split this row into individual rows. Code should be fun, because otherwise it's just a job. This was a wonderful problem and I am quite proud of my solution. You might have heard of the , a 25-day challenge involving a programming puzzle a day, to be solved with the language of your choice.

Next

Sound Code

advent of code

For this problem, however, I eventually ended up switching to simply checking, for each coordinate, the distance to all points. In order to calibrate the device, you need to find the first frequency that repeats. As the problems continued to increase in complexity, I ended up writing these automatons quite frequently as a brute-force solution. While this problem can undoubtedly be solved in Futhark, it would require a level of manual stack management that I really cannot stomach. Note by the Moderators: This topic is for general discussion about the Advent of Code 2018. Each Elf has made a claim about which area of fabric would be ideal for Santa's suit. The funny thing is that if you're comfortable with creating dynamic data structures like linked lists, writing a solution using a doubly linked list and running it on part 2 actually takes a fraction of the time of writing the original solution and running it.

Next

Advent of code — Having fun finding solutions to interesting problems. » Code

advent of code

Solution Megathreads December 2018 Su M T W R F Sa 26 27 28 29 30 31 See previous years: Quick Search by Flair Because you're lazy and we like making things easy for you. Day 1, Part 2 In part 2, we process the list multiple times. I implemented it as a 2D cellular automaton updating the entire world for every iteration, even though only a tiny fraction of cells those near the head of falling water will actually change. Then I try to convert it to F , which is mainly to improve my fluency with F and hopefully to pick up some new tricks along the way. This information can be wrong, which is e.

Next

Advent of Code: Most Popular Languages

advent of code

Around that time, Yan Cui started to post his solutions with F on his. Some aspect to compare could be the amount of libraries needed for the solution or the execution time. This unlocked part 2 which changed the number of marbles in the game from 70950 to 70950 00. So if taking the set of a sentence reduces its length, then there was a duplicate word. And let the computer worry about the zeros and ones. All in all, I'd say that converting the input to Claim objects is wasting resources and you should focus on your intermediate matrix representation instead. Further work could include looking at the completion of the challenge by language, potentially using the GitHub activity of each repo as an imperfect proxy.

Next