@@ -0,0 +1,1393 @@
+package engine;%0A%0Aimport java.util.*;%0A%0A/*  Word Count Example (How many times a sub word appears with some length)%0A*%0A*   Word = 101101%0A*   sub word length = 3%0A*   Output = %7B011=1, 110=1, 101=2%7D%0A*/%0A%0Apublic class WordCount%0A%7B%0A  public static Map%3CString, Integer%3E wordCount(String word, int subWordLength) %0A  %7B%0A%09%09Map%3CString, Integer%3E map = new HashMap%3CString, Integer%3E();%0A%09%09String subWord = %22%22;%0A%09%09int newStartingIndex = 0;%0A%09%09int newEndingIndex = subWordLength;%0A%09%09%0A                //Goes through the word and finds each subword starting at the beginning index %0A                //and ending at the subWordLength, then realigns the indices for the next subwords%0A%09%09for (int i = 0; i %3C word.length(); i++)%0A%09%09%7B%0A%09%09%09subWord = word.substring(newStartingIndex, newEndingIndex);%0A%09%09%09newStartingIndex++;%0A%09%09%09newEndingIndex = newStartingIndex + subWordLength;%0A%09%09%09%0A                        //if the map doesn't contain this subword then add it to the map,%0A                        //if it does, replace the previous one that was added and increment each time it gets added%0A%09%09%09if (!map.containsKey(subWord))%0A%09%09%09%7B%0A%09%09%09%09map.put(subWord, 1);%0A%09%09%09%7D%0A%09%09%09else%0A%09%09%09%7B%0A%09%09%09%09map.replace(subWord, map.get(subWord) + 1);%0A%09%09%09%7D%0A%09%09%09%0A                        //if the ending index gets higher than the word length, all of the subwords have been found%0A%09%09%09if (newEndingIndex %3E word.length())%0A%09%09%09%7B%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09return map;%0A%09%7D%0A%7D  %0A

Create WordCount.java