public static void main(String args[]){
        SuffixArray suffix = new SuffixArray();
        String str = "missisippi";
        Integer result[] = suffix.createSuffixArray(str.toCharArray());
        System.out.print(suffix.subStringSearch(str.toCharArray(), "sippi".toCharArray(), result));
    }
http://www.geeksforgeeks.org/suffix-array-set-1-introduction/
src/com/interview/suffixprefix/SuffixArray.java