KMP prefix table

前端 未结 7 1047
说谎
说谎 2020-12-02 07:58

I am reading about KMP for string matching.
It needs a preprocessing of the pattern by building a prefix table.
For example for the string ababaca

7条回答
  •  遥遥无期
    2020-12-02 08:22

        String string = "abababca";
        int[]array = new int[string.length()];
    
        int i = 1;
        int j = 0;
    
        while(i

提交回复
热议问题