DEV Community

Discussion on: String Compression. Facebook interview question.

Collapse
 
akhilpokle profile image
Akhil

Yep, the function can only take string with characters as a input for encoding, with integers it becomes quite complicated but doable by using some special characters like "$" or "#" and it must be guaranteed that the said special character won't be used.

Your method is actually a much smarter way of achieving it! Thanks for the tip :)