Oct-26-2021, 06:43 PM
Isn't it silly searching a dictionary? I like your idea of making a reverse dictionary. I would probably have separate encoder and decoder dictionaries, but as long as there is no overlap in the keys and values, you can put it all in one.
The encode and decode functions should be nearly identical other. Your decode function failed because you need to remove the trailing '///' before splitting the encoded string into codes.
The encode and decode functions should be nearly identical other. Your decode function failed because you need to remove the trailing '///' before splitting the encoded string into codes.