Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,441 Points

Advent of Code 2021

The yearly coding challenge [Advent of Code](adventofcode.com) starts tomorrow 1 Dec 2021!

As Treehouse Teacher Megan Amendola, said in a post about last year’s event:

Hi all! I just wanted to share Advent of Code has started! It is a fun way to test and practice your skills with some fun programming challenges. You can even view challenges from previous years as well. It is also not specific to any one language, so feel free to use any language you like to complete each challenge.

How it works:

1) You attach an account (Facebook, GitHub, etc.) to sign in

2) Work through the challenge locally or use workspaces

3) Submit your answer to see if you got it right! They also have links to their Reddit community if you get stuck.

This is a great way to work those problem-solving muscles.


I'd also love to see how you all are tackling the challenges if you want to share in this post. Happy coding!

As an adding bonus for west coast folks, new puzzles drop at 9pm PST (that’s TONIGHT!!)

Post comments about your progress! Good Luck!!

Chris Freeman
Chris Freeman
Treehouse Moderator 68,441 Points

There is also daily treads on the r/adventofcode subreddit!

A great way to pick up hints and check out solutions in other languages!

Steven Parker
Steven Parker
231,268 Points

You west coasters have an advantage, I usually don't get to it until the next day!   :stuck_out_tongue:

I do them mostly in JavaScript (though I did one last year just using Excel).   :santa: Happy Coding! :christmas_tree:.

Perhaps someone might want to start a private leaderboard for Treehouse students and post the invitation to it here. One caveat: they only support 200 members, but if you get overwhelmed you can always close it and post an update to your original invitation message here.

3 Answers

Hi! I just completed day 1!!

Chris Freeman
Chris Freeman
Treehouse Moderator 68,441 Points

Congrats! If you get really hooked, all the previous years puzzles are available. That’s 300 ⭐️s!!

What language are you using? I have been using Python.

I am using C#

Hi! The second part of day 3 was a little tough for me. I can't even measure the time complexity of my solution

Chris Freeman
Chris Freeman
Treehouse Moderator 68,441 Points

The complexity is basically how many times you need to loop through the data. As the number of drawn numbers increases how does the code execution grow. Since boards and max drawn numbers are limited, it’s likely it’s not far from linear O(n) unless there’s a whole lot of unnecessary looping.