Code Golf

by Marcel Veldhuizen 18. February 2013 14:13

Every now and then I just want to do something silly with code, like some code golf. Just for a moment to forget about best practices and write the shortest possible program to solve a problem.

Today I happened to run into one of those projects on my hard disk, which happened to be in C# (it's not exactly the tersest language there is, so it may be a little unusual). It's an exercise from an old Google Code Jam. The problem to be solved and some solutions can be found in this StackOverflow question, including my own. It measures 398 characters after removing insignificant whitespace, the longest solution between a host of different languages.

Today I realized that there was a slightly shorter solution than the one below, but perhaps you can come up with something even better?

More...

Tags: , ,

Coding4Fun

Marcel Veldhuizen

Software Architect by profession, mostly focused on Microsoft .NET technology.

Metal enthusiast; I love going to concerts :)

 

RecentPosts

Recent Tweets

Note: For Customization and Configuration, CheckOut Recent Tweets Documentation