At Criteo, we were founded on technology, and technology is our passion. We enjoy challenges, so we were ready to participate in Advent of Code once again this year. Additionally, as we did in 2023, we decided to support the initiative by becoming a sponsor. Community building is at the core of our mission, so we are always open to supporting such great initiatives.

Our private leaderboard
In Criteo, a Slack channel was where people shared their thoughts (and spoilers) daily. It’s incredible how an initiative like AoC can create that atmosphere. Everyone was quite active and loved discussing the daily problems. That channel was on fire all the time 🔥 with over 150 people on it.
We also have our own private leaderboard, where we compete against each other. As the visualization of the private leaderboard on Advent of Code’s website is quite basic, one of our Criteos, Ivan Bessarabov, created a tool using the Advent of Code’s API that allows access to JSON data from private leaderboards.
In his own words: “I was curious to explore our private leaderboard from different perspectives, so I created a small project to visualize the data. ChatGPT and I have continuously improved this project for the past two years, during Advent of Code. It generates a set of static HTML pages that provide a detailed view of what’s happening on our leaderboard.”
You can find Ivan’s tool here 👇
GitHub – bessarabov/visualize_advent_of_code_private_leaderboard
Contribute to bessarabov/visualize_advent_of_code_private_leaderboard development by creating an account on GitHub.
github.com

Experiences from our Criteos
Let’s now share some personal experiences from people inside R&D. We asked them questions about their participation in the AoC.
Fun fact: Do you want to know which programming languages were used?

Vijay Agnihotri
What’s been the challenge that you liked the most and why?
I think of Day 24, part 2, when it really made sense to take a step back, take a pen and paper, and try illustrating what the puzzle — the ripple carry adder, in this case — was about. While I didn’t try to solve it fully with pen and paper, I could definitely see that it could be done, which was a little astonishing given the complicated nature of the problem.
What’s been the most difficult day and why?
Day 17 was the most difficult for me, the problem was hard to understand conceptually and on top of it, I was away at Criteo Beats. It was on my mind all day, and I even tried to look up some microprocessor theory, only to get it once I read the problem and the outputs and somehow found the patterns.
What language did you use? Did you learn something new?
I used Python because I wanted to feel comfortable with it. I can say that I’m a bit faster at coding a solution after the challenge, partly due to the urgency of submitting solutions. I learned many new things about the language that I had some knowledge of but hadn’t used — Regexes, OrderedDict, and generating combinations using itertools, among others.
Why did you participate? How would you encourage people to participate in the following editions?
I didn’t know about it in 2023 and missed all the fun my colleagues were having. It was definitely a lot of fun this time around if you like patiently solving puzzles. It will definitely brush up your coding, reasoning, and understanding skills, no matter what level you are at.
I also brushed up on my CS concepts, as I was asked to implement quite a few algorithms — especially ones with Graphs — in multiple puzzles. Solving problems with fellow Criteos is much more fun, and one gets to consider different perspectives and techniques for the same problem, which made it even more enriching for me.
Clément Charnay
What’s been the challenge that you liked the most and why?
Two days stood out particularly:
- Day 19, and not just because it happens to be my birthday. I really like my solution to finding the number of pattern combinations that can fit a design and the thought process behind it. For me, the idea was to see how many patterns of a given length could fit in a design at every position and work through the combinations based on that.
- Day 21, which many people seem to have struggled with at Criteo, was indeed a can of worms. The problem of robots controlling the remote control of another robot was indeed a can of worms. But I thought of the right optimizations quite early and caching saved my life for the rest of the day.
What’s been the most difficult day and why?
I’ll single out 3 days:
- Day 24: This is the second year in a row that Christmas Eve is not blissful. This was a very convoluted way to introduce the classic binary adder from electronics, and spotting inconsistencies in this mess was tedious.
- Day 17: Those days where you get a feel for the solution by looking for patterns in the behavior described by the problem always take time.
- Day 9: I spent a lot of time on part 2 trying to cascade down those files in memory and keep an up-to-date list of positions, but representing Files in an object-oriented way turned out to be much easier.
What language did you use? Did you learn something new?
Like in 2023, I used Python. I discovered the caching mechanism from functools, which helped me for several days and saved me the need to maintain a cache myself.
In terms of algorithms, discovering the existence of Bron-Kerbosch on day 23, when I was trying to find the biggest set of computers all connected to each other, saved my life. I did it right after a 24-hour journey to Indonesia and had little energy to spend a lot of time on the problem.
Let’s see if I can find the courage to learn Rust and use it next year, as this was one of my goals for 2024, which I had to give up.
Why did you participate? How would you encourage people to participate in the following editions?
I love math and programming challenges, having done a lot of Project Euler in the past. I discovered Advent of Code last year after joining Criteo, and immediately thought it was an amazing initiative, very challenging at times because December is rarely a quiet time for people.
I think people should not be scared because there are many different ways to enjoy Advent of Code. Some competitive individuals may try to solve problems as soon as they are released and aim for the top of the leaderboard. However, it’s also quite enjoyable to approach it in a quieter way — solving problems on your own time and at your own pace. It’s not time-bound, so you can always pursue those missing stars after the New Year.
Ivan Bessarabov
What’s been the challenge that you liked the most and why?
My absolute favorite challenge this year was Part 2 of Day 14.
The problem started out quite ordinary: a grid with robots positioned on it. Each second, the robots moved according to specific rules, and the task was to determine their exact locations after 100 seconds.
The solution was quite straightforward — just a matter of implementing the given rules. But the second part of the challenge was absolutely mind-blowing 🤯 The author of the task stated that sometimes the robots arrange themselves into a picture of a Christmas tree. The task was to determine after how many seconds this happens. “How can that be? How can you set up an algorithm for such things?” (Did you get the reference?)
After recovering from the initial shock of such a vague problem statement, I started thinking. There are countless ways to draw a Christmas tree, but the exact shape used in the task was unknown. My first assumption was that the tree would span almost the entire height of the grid, so I tried searching for a long vertical line — but found nothing. Next, I considered that a Christmas tree drawing should contain long diagonal lines. I attempted to detect them, but again, I had no success (though it’s entirely possible I made a mistake in my implementation). An additional challenge was the complete uncertainty about when the robots would form this picture — would it happen after 100,000 iterations, a million, or even a billion?
After several failed attempts, I decided to take a visual approach and see what pattern the robots were forming. I wrote a script that displayed the grid whenever a significant number of robots appeared in a vertical column. And what a joy it was when I spotted the Christmas tree on just the 15th frame! 😊

When discussing this challenge with my colleagues, I was fascinated by other creative approaches — such as detecting symmetry in the patterns or searching for a four-line triangle. But what amazed me the most was the sheer brilliance of the hack used by Neil Thistlethwaite. Instead of searching for the Christmas tree, he identified the first grid state where each robot occupied a separate cell (i.e., no cell contained multiple robots). This approach wasn’t guaranteed to work — but it did!
What’s been the most difficult day and why?
The most difficult challenge for me this year was Part 2 of Day 17.
The first part involved implementing a processor with eight instructions, each performing a specific action. The task was to implement these actions and execute a program on this processor. Like many first parts, this was a fairly straightforward task — you simply follow the instructions and implement what’s described.
But the second part was an absolute nightmare. The task was to determine when the program outputs itself. I wrote the code using a naive brute-force approach, which worked fine with the test data. However, when I ran it on the real data, the program failed to produce an answer. After taking some measurements, I calculated that with this brute-force method, it would take approximately 5 billion years to find the solution. After making some adjustments, I dramatically improved my solution — with the new approach, it would take only 1.2 billion years to find the answer. 🤣
What language did you use? Did you learn something new?
I used Perl to solve Advent of Code challenges. It’s a language in which I can write very quickly. The first days of Advent of Code consist of very simple challenges. You just follow the instructions — there’s no need to think about complex algorithms or optimizations.
In the first few days, I was at the top of our private leaderboard — I can solve simple challenges very quickly using Vim and Perl. On Day 3, I set a personal record — I made it into the top 1,000 global players.
Advent of Code is all about learning and improving. I gained a better understanding of pathfinding algorithms, specifically A* and Dijkstra’s algorithm.
I also realized that to perform well in Advent of Code, preparation is key. That’s why I continue to improve my small framework, which helps me solve challenges more efficiently.
If anyone is curious about reviewing my solutions for this year’s challenges, here is the GitHub repository with the code 👇
GitHub – bessarabov/advent_of_code_2024
Contribute to bessarabov/advent_of_code_2024 development by creating an account on GitHub.
github.com
Why did you participate? How would you encourage people to participate in the following editions?
For me, Advent of Code is an amazing project that brings me a lot of joy to work on. It’s related to programming, but it’s completely different from what I do in my day-to-day job. The goal isn’t to write clean, maintainable code that will last for years — it’s simply to solve the problem. The code I write for Advent of Code would never pass my own code review, but as long as it gets the job done, that’s all that matters.
I’m incredibly grateful to the creator of Advent of Code, Eric Wastl, who has been running this event for 10 (!!!) years now. It’s absolutely amazing that Advent of Code isn’t just about solving a problem and moving on. You’re solving challenges alongside thousands of other people, which means you can explore different solutions, analyze alternative approaches, and even enjoy incredible visualizations of the problems and their solutions. Many of these discussions and activities take place on Reddit.
I’m also very grateful to Criteo for sponsoring this event. This year, I also supported Advent of Code by purchasing AoC++. I spend so much time enjoying Advent of Code, so I’m happy to contribute a bit as a sign of appreciation.
For those who have never tried Advent of Code — just give it a shot! Solve a few challenges from previous years, check out solutions on YouTube and Reddit, and see if you enjoy it. You might end up loving it! 🚀
The Advent of Code has once again been an amazing experience — challenging, exciting, and full of learning. We can’t wait for next year’s edition and look forward to enhancing our skills, competing with friends, and continuing to enjoy this wonderful tradition!
Did you like the article? Would you like to be part of this incredible team? This article is an excellent example of our culture and values. Check our website to learn more about us and our positions.
Engineering
We are creators! From designing ground-breaking products to finding unique ways to solve technical challenges at an…
bit.ly




