In my attempt to learn Ruby out in the open, here’s my solution for Project Euler Problem 42. I don’t have much to say about this problem except for the fact that it holds strong ties to Euler 12 and Euler 22 so it doesn’t take long to piece this solution together. Minor note — you’ll notice [...]
In my attempt to learn Ruby out in the open, here’s my solution for Project Euler Problem 41. I started off by iterating through all prime numbers up to the max value but it took way too long for the routine to complete. Instead I ended up gathering all possible pandigitals and I iterated through each descending. [...]
In my attempt to learn Ruby out in the open, here’s my solution for Project Euler Problem 40. There’s nothing all that exciting going on here. I’m sure you noticed in past solutions that one can easily map a string to a range of characters. Perhaps the fact that Ruby can build a range of string values [...]
In my attempt to learn Ruby out in the open, here’s my solution for Project Euler Problem 39. I broke my rule again and I worked through the problem a couple of different ways. In the first solution, I’m incrementing the number of occurrences using a hash and then I get the max count using (surprise) the [...]
In my attempt to learn Ruby out in the open, here’s my solution for Project Euler Problem 38. I made a deal with myself. I intend to complete the first fifty Euler problems by Wednesday, August 18. That sounds more like a challenge rather than a deal but that’s besides the point. I figure the only way [...]
Does this ever happen to you? You finish coding something up and the very second before you become pleased with yourself you suppress that wonderful feeling and wrestle with the fact that coders aren’t exactly impartial when it comes to judging their own code. You realize you have two options. 1, you can accept the [...]
In my attempt to learn Ruby out in the open, here’s my solution for Project Euler Problem 37. There’s nothing pretty going on here. I can’t sleep so let’s call this a late night hack. It’s not that bad, but… Chop! — which I personally wish was called Chomp! — is new. Everything else is pretty much [...]
In my attempt to learn Ruby out in the open, here’s my solution for Project Euler Problem 36. As Jon promised, the mid-30s problems on Project Euler are easy to solve. It’s nice that integer to binary conversation is built into the Ruby language. That helped a bit. As always, any feedback is welcome. # Euler 36 [...]