https://medium.com/@zeesek/100-days-of-leetcode-problems-in-typescript-encode-and-decode-strings-problem-1619a1216548