@@ -0,0 +1,1511 @@
+package com.williamfiset.algorithms.strings;%0A%0Aimport static java.util.Objects.isNull;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Apublic class BoyerMooreStringSearch %7B%0A%0A  /**%0A   * Performs Boyer-Moore search on a given string with a given pattern%0A   *%0A   * @param text the string being searched in%0A   * @param pattern the string being searched for%0A   * @return List of indexes where the pattern occurs%0A   */%0A  public List%3CInteger%3E findOccurrences(String text, String pattern) %7B%0A    if (isNull(text) %7C%7C isNull(pattern)) %7B%0A      return new ArrayList%3C%3E();%0A    %7D%0A    List%3CInteger%3E occurrences = new ArrayList%3C%3E();%0A%0A    Map%3CCharacter, Integer%3E skipTable = new HashMap%3C%3E();%0A    for (int i = 0; i %3C pattern.length(); i++) %7B%0A      skipTable.put(pattern.charAt(i), pattern.length() - i - 1);%0A    %7D%0A%0A    int textIndex = pattern.length() - 1;%0A    while (textIndex %3C text.length()) %7B%0A      int patternIndex = 0;%0A      boolean match = true;%0A      while (patternIndex %3C pattern.length() && match) %7B%0A        if (text.charAt(textIndex - patternIndex)%0A            != pattern.charAt(pattern.length() - patternIndex - 1)) %7B%0A          match = false;%0A          textIndex +=%0A              skipTable.getOrDefault(text.charAt(textIndex - patternIndex), pattern.length());%0A        %7D%0A        patternIndex++;%0A      %7D%0A      if (match) %7B%0A        occurrences.add(textIndex - (pattern.length() - 1));%0A        textIndex += pattern.length();%0A      %7D%0A    %7D%0A%0A    return occurrences;%0A  %7D%0A%7D%0A

Move BoyerMooreStringSearch to new project structure for #120