public String[] evaluate(String[] words, String pattern) {
    if (words == null || pattern == null) {
      throw new IllegalArgumentException("You can't use null instances as input.");
    }

    List<String> result = new LinkedList<String>();
    for (String word : words) {
      if (matchAsteriskRegularExpression(word, pattern)) {
        result.add(word);
      }
    }
    return result.toArray(new String[result.size()]);
  }
Combination of iterative and recursive approaches to resolve this problem. The complexity
order in time terms is O(N*M) where N is the number of elements in the input array and M the
size of the word in the array. In space terms, the complexity order of this algorithm is O(N)
because we are using an additional data structure to store the result.
src/main/java/com/github/pedrovgs/problem35/AsteriskRegularExpression.java