The idea is to encode a list of strings into one string using
then decode it back by reading the length first and extracting each word.
My mistake was mixing the logic in decode I tried to process the word while still searching for
which caused errors. I learned that decoding must follow a clear order find # read length, extract word, then move forward.
length#word
then decode it back by reading the length first and extracting each word.
My mistake was mixing the logic in decode I tried to process the word while still searching for
#
which caused errors. I learned that decoding must follow a clear order find # read length, extract word, then move forward.