public class PrefixTrie {
class Node {
int counter;
char c;
Node next;
public int getCounter() {
return counter;
}
public void setCounter(int counter) {
this.counter = counter;
}
public char getC() {
return c;
}
public void setC(char c) {
this.c = c;
}
public Node getNext() {
return next;
}
public void setNext(Node next) {
this.next = next;
}
public Node(char c){
this.c = c;
this.counter = 0;
this.next = new Node;
}
}
class Tree {
public Tree(){
}
Node next = new Node;
public void add(String word) {
this.next=next;
}
}