Advent of Code 2022

Happy Holidays everyone. Im writing to you all now to ask you to join me in a bit of fun again for the advent of code for 2022.

If you are new or haven’t heard, Advent of Code is a daily challenge for the month of December to strut your stuff with your code skills! Each day they provide you with a word problem that you have to solve programmatically. Any language is acceptable just try not to make it too painful for yourself. These questions are hard, so have fun with it!

We have a leaderboard that we started last year so feel free to join it. If you do make your name public!

Leader Board Code: 1680621-971def8b


Doing it this year!

Interesting… I’m the one who created the leader board, but I have no idea how I logged in last year. lol. So this year, when I logged in, there is no user/pass to use, and I used Google, which showed up as new. So that means we have no admin over the leader board! haha.

Do you have multiple gmails? i entered in the answer into the wrong gmail earlier today… lol

Let’s do this!

Got you 4 gold stars, but pretty sure I’ll forget all about this in a couple of days… lol Also, to show up on the leaderboards we have to be among the first to get the solution, but it only unlocks at midnight…

1 Like

#Day2 :white_check_mark:

Ha! First of our leaderboard to complete Day3! :muscle: :sunglasses:


I chose sleep over coding…:stuck_out_tongue:


day 3 part 1 kicked my butt lol. Part two was a breeze

I’m sure it only gets easier :question: :grinning:

ha! Part 2 got me instead cause they word some of their stuff a bit tricky! But you are right if you read more carefully than me, then Part 2 is easier

Everyone reads more carefully than you. Lol

I haven’t seen a problem past day 5 every year so lets hope i can beat my record LOL

Day 4 complete! This one was super easy in C#, Linq is kind of cheating here…

1 Like

Now that I did it I am wondering why in the world did you use linq… or rather how hahaha

Sigle for loop should do the trick for both part a and b :thinking:

Also I feel like your timezone is cheating… or you are a vampire! 7 hours ago was nearly 2 am over here hmmm :joy:

Took the input into elf1seq and elf2seq, and used .Intersect(). Loops are sooo… 1990… :smiley: Both problems were like 3-4 lines of code…

And I posted at 1AM, not that late TBH… :wink:

hahah and I pray tell what we think LINQ does in the backend to iterate :joy:

We should when we are done all post our answers to github or something it would be interesting to see all the different approaches.

You would be surprised! .NET 7 introduces major performance enhancements with Linq, including use of AVX… Up to 45 times faster than simple loops!

Have a look here: The INSANE performance boost of LINQ in .NET 7 - YouTube