Anyone can help to look what's wrong with my code? Couldn't pass?
\npackage lc;\n\nimport java.util.Arrays;\n\npublic class lc1397 {\n\n    private static int mod = 1_000_000_007;\n\n    public static int findGoodStrings(int n
```\npackage lc;\n\nimport java.util.Arrays;\n\npublic class lc1397 {\n\n    private static int mod = 1_000_000_007;\n\n    public static int findGoodStrings(int n, String s1, String s2, String evil) {\n        int[] next = getNext(evil);\n        long[][][][] dp = new long[n][2][2][evil.length()];\n        for (int i = 0; i < dp.length; i++) {\n            for (int j = 0; j < dp[i].length; j++) {\n                for (int k = 0; k < dp[i][j].length; k++) {\n                    Arrays.fill(dp[i][j][k], Integer.MIN_VALUE);\n                }\n            }\n        }\n        dfs(0, 0, 0, 0, n, s1, s2, evil, next, dp);\n        return (int)dp[0][0][0][0];\n    }\n\n    /*\n    lowOk, currStr is greater than s1;\n    highOk, currStr is smaller than s2;\n     */\n    private static long dfs(int pos, int lowOk,  int highOk, int evilPos, int n, String s1, String s2, String evil, int[] evilNext, long[][][][] dp) {\n        if (pos == n && evilPos != evil.length()) {\n            return 1;\n        }\n        if (pos == n || evilPos == evil.length()) {\n            return 0;\n        }\n        if (dp[pos][lowOk][highOk][evilPos] != Integer.MIN_VALUE) {\n            return dp[pos][lowOk][highOk][evilPos];\n        }\n        dp[pos][lowOk][highOk][evilPos] = 0;\n        char from = lowOk == 1 ? \'a\' : s1.charAt(pos);\n        char to = highOk == 1 ? \'z\' : s2.charAt(pos);\n        for (char ch = from; ch <= to; ch++) {\n            int newLowOk = (lowOk == 1 || ch > from) ? 1 : 0;\n            int newHighOk = (highOk == 1 || ch < to) ? 1 : 0;\n            int newEvilPos = ch == evil.charAt(evilPos) ? evilPos + 1 : evilNext[evilPos];\n            dp[pos][lowOk][highOk][evilPos] = (dp[pos][lowOk][highOk][evilPos] + dfs(pos + 1, newLowOk, newHighOk, newEvilPos, n, s1, s2, evil, evilNext, dp)) % mod;\n        }\n        return dp[pos][lowOk][highOk][evilPos];\n    }\n\n    private static int[] getNext(String str) {\n        int[] next = new int[str.length() + 1];\n        int i = 0, j = 1;\n        while (j < str.length()) {\n            if (str.charAt(i) == str.charAt(j)) {\n                next[j + 1] = i + 1;\n                i++;\n                j++;\n            } else if (i != 0) {\n                i = next[i];\n            } else {\n                j++;\n            }\n        }\n        return next;\n    }\n\n    public static void main(String[] args) {\n//        System.out.println(findGoodStrings(2, "aa", "da", "b"));\n//        System.out.println(findGoodStrings(8, "leetcode", "leetgoes", "leet"));\n//        System.out.println(findGoodStrings(2, "gx", "gz", "x"));\n//        System.out.println(Arrays.toString(getNext("abcddabcxxxxabcddabc")));\n            System.out.println(findGoodStrings(8, "pzdanyao", "wgpmtywi", "sdka"));\n    }\n    /*\n    [x x x] x x x x [x x x] x\n         ^               ^\n         i               j\n\n     */\n}\n```
[]