Hi All,
Has anyone else out there been doing the Advent of Code this holiday season? You get a fun little coding puzzle every day of the advent season (December 1 through 25). They can be done using any programming tool or language, but naturally I'm doing them all in SAS.
I'd love to compare solutions if anyone else is interested. In several cases, I've come up with one proc-oriented solution and another data-step-only solution (frequently involving hash objects). I've already learned a few new tricks.
Unfortunately, you won't find me on the leaderboard. You get there by being one of the first few to submit a correct solution after each day's problem goes live at midnight (Eastern time). If I'm up writing code after midnight, it's only because something has gone very, very wrong. 🙂
Josh Horstman
Interesting. The Dec 6 problem asks for locations that are near any points in a given set. You can use the DISTANCE function in SAS/IML (which supports Manhatten distance) to solve the problem. A similar idea was discussed in this blog post about nearest neighbors.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.