-
Problem 1 from Project Euler . net (“set”-based solution)
This time, I fill a hash map for step values of 3 and of 5. No noticeable difference from my first try, until you start trying to find results for much larger than stopping at 999, at which point amount of memory consumed/allocated makes this method way more inefficient. x=0h = {} 3.step(999, 3) { |i|…
-
A fledgling blog on the progress of technology
I think I'm generally more interested in the small-time blogs than the well-established blog. Well-established blogs with a solid following can succumb to group-think in the guise of introspection. Sometimes, a newer blogging voice can present a different perspective on existing topics: Found from a @implu tweet Retire your desktop: The Future: – Greenspan's perception…
-
Problem 1 from Project Euler . net
Trying to reinforce the syntax in ruby, I did Problem 1 from Project Euler . net: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3…