public int subStringSearch(char str[],char subString[], Integer suffix[]){
        int low =0;
        int high = suffix.length-1;
        while(low <= high){
            int mid = (low + high)/2;
            int result = stringCompare(str, subString, suffix[mid]);
            if(result == 0){
                return suffix[mid];
            }
            if(result > 0){
                high = mid-1;
            }else{
                low = mid+1;
            }
        }
        return -1;
    }
http://www.geeksforgeeks.org/suffix-array-set-1-introduction/
src/com/interview/suffixprefix/SuffixArray.java