package ua.yandex.shad.autocomplete;

import ua.yandex.shad.tries.Tuple;
import ua.yandex.shad.tries.Trie;

public class PrefixMatches {

    private Trie trie;

    public int load(String... strings) {
        for (String string : strings) {
            for (String str : string.split("\\s+")) {
                trie.add(new Tuple(str, str.length()));
            }
        }
        return size();
    }

    public boolean contains(String word) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public boolean delete(String word) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Iterable<String> wordsWithPrefix(String pref) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Iterable<String> wordsWithPrefix(String pref, int k) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int size() {
        return trie.size();
    }
}

@@ -153,16 +153,66 @@
 ie trie;
+%0A    private static final int MIN_WORD_LENGTH = 3;
 %0A%0A    pu
@@ -336,24 +336,83 @@
 (%22%5C%5Cs+%22)) %7B%0A
+                if (str.length() %3E= MIN_WORD_LENGTH) %7B%0A    
             
@@ -455,16 +455,34 @@
 th()));%0A
+                %7D%0A
         

Fix bug in load method of PrefixMatches class. Now tests are GREEN.