Skip to content

Instantly share code, notes, and snippets.

View andryjohn's full-sized avatar
🔬
Eating Ice cream

Rajohnson Andry andryjohn

🔬
Eating Ice cream
View GitHub Profile
@andryjohn
andryjohn / gist:da62641b3f3fbcd026f87757f364742d
Created May 22, 2019 15:39 — forked from malandrina/gist:3745321
Anagram solvers for same-length anagrams, in Ruby

Anagram solvers for same-length, single word anagrams, in Ruby

I wanted to write an anagram solver that would return a list of the anagrams of the same length of a given word/combination of characters, such that:

same_length_anagrams("deify") => "edify"

or

same_length_anagrams("ogb") => "bog", "gob"