Develop and implement an ADT for preprocessing a
string to support efficiently answering queries of the form Howmany times does a given
k-gram appear ? Each query should take time proportional to k log Nin the worst case,
where N is the length of the string.(Please write programin java ,but not theory)

Implement an ADT with time complexity ofklogn