Introduction - If you have any usage issues, please Google them yourself
The next input index value is 2, which is the index corresponding to the letter b. We decode a b and concatenate it with our current pattern to form the pattern ab. As this does not exist in the dictionary, we add it as the sixth element.
The next input is 6, which is the index of the pattern ab. Thus, we decode an a and a b. We first concatenate a to the existing pattern, which is b and form the pattern ba. As ba does not exist in the diction