Skip to content

Mattc007/ruby_euler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby_euler

An implementation of projecteuler.net problems in Ruby.

In order to learn Ruby and knock the cobwebs off my math skills, I am attempting the problems on projecteuler.net using Ruby.

My personal workflow looks something like this:

  1. Implement a solution using only what I currently know in my Ruby and math toolbox.
  2. Do some research and generally rediscover a better mathematical formula or algorithm (like a better formula for triangle numbers, finding the nth prime number, etc.)
  3. Implement a better solution using better mathematics and/or "the Ruby way".

For instance, for the "find the Nth prime number":

  1. Implement a naive version of what I think is the Sieve of Eratosthenes.
  2. Check out the wikipedia article and learn a much better implementation. 3a) Implement a new version of the solution using this new method. 3b) Research a "prime" lib available in Ruby, learn it and use it instead.

Bitdeli Badge

About

An implementation of projecteuler.net problems in Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages