While in class, a friend of mine kept texting me "hahaha."
I then thought about a language (HaHa) where each "ha" corresponded to a letter in the Latin alphabet.
For example:
a = ha
b = haha
c = hahaha
ect...
This makes it easy to convert a word into HaHa.
However, converting a HaHa string BACK into a Latin word becomes very complicated.
Specifically: hahaha can be translated to:
aaa
ba
ab
c
The Question:
Given a string in HaHa, what possible Latin words can be created? For now, only enter one word at at time.
(To remove the need of a dictionary, just create all possible strings in Latin)
Why is this in JavaScript?
My host will shut off my box if the cpu is at 100% for more than 90 seconds - which can happen easily with large HaHa strings. Hint: Exponential.
I also wanted a way to have people easily send HaHa codes, but the time needed to generate possible Latin words is far too high.