StringCoder - Part B¶
Part b. Write the StringCoder method encodeString
. A string is encoded by determining the substrings
in the master string that can be combined to generate the given string. The encoding starts with a string part
that matches the beginning of the word, followed by a string part that matches the beginning of the rest of
the word, and so on. The string parts are returned in an array list in the order in which they appear in word.
The helper method findPart
must be used to choose matching string parts in the master string.
Try and Solve It¶
Complete method encodeString
below.
The code below has a main method for testing your method.
You have attempted of activities on this page