I figured how the encryption works, got the dictionary and the formula but I have problems with long strings as my solution includes calculating 2^(positionInMessage)... which of course eventually leads to too big numbers. Is there a math trick to optimize that?
I would love to know the process behind this. Both binary and Euclidean were to slow for this kata. I'm really curious where this solution comes from mathematically.
I figured how the encryption works, got the dictionary and the formula but I have problems with long strings as my solution includes calculating 2^(positionInMessage)... which of course eventually leads to too big numbers. Is there a math trick to optimize that?
I would love to know the process behind this. Both binary and Euclidean were to slow for this kata. I'm really curious where this solution comes from mathematically.