https://github.com/davidegrayson/anagram
Some algorithms for finding two-word anagrams. Probably not useful to anyone.
https://github.com/davidegrayson/anagram
Last synced: 10 months ago
JSON representation
Some algorithms for finding two-word anagrams. Probably not useful to anyone.
- Host: GitHub
- URL: https://github.com/davidegrayson/anagram
- Owner: DavidEGrayson
- Created: 2011-08-15T00:21:15.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-08-18T01:26:35.000Z (over 14 years ago)
- Last Synced: 2025-07-01T07:04:04.071Z (11 months ago)
- Language: Ruby
- Homepage:
- Size: 129 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
We are trying to find the fastest algorithm for finding all the
two-word anagrams of the word 'documenting'.
To install the prerequisites, run:
gem install bundler
bundle
To choose which algorithm you want to work on, run one of:
export ALGORITHM=kata
export ALGORITHM=david
export ALGORITHM=josh
export ALGORITHM=paul
Alternatively, you can prepend "ALGORITHM=name" to any of the
other commands listed in this documentation.
While you are developing an algorithm, test it for correctness
by running:
watchr watch.rb
or
rspec spec.rb
Test it for speed and correctness by running:
time ./go.rb
Figure out how to speed it up by running ruby-prof (which adds significant overhead):
ruby-prof go.rb