recursion with memorization solution for alien languages
update solution to alien languages