private void KMPSearch() {

        // Hitung pinggiran (m, p, b)
        int k = 0, q = -1;
        b[k] = q;
        while (k < m) {
            while (q >= 0 && p[k] != p[q]) {
                q = b[q];
            }
            k++;
            q++;
            b[k] = q;
        }
        // KMPSearch
        int o = 0, j = 0;
        while (o < n) {
            while (j >= 0 && t[o] != p[j]) {
                j = b[j];
            }
            o++;
            j++;
            if (j == m) // a match is found
            {
                posisisama += (o - m) + " ";
                kemiripan[(o - m)] = '^';
                j = b[j];
            }
        }
    }