Can someone explain why you can't simply count all strings between s1 and s2?
Can\'t you just count instead of doing complicated DP?\nI have not solved this question yet but I am not sure why DP is required.\nCan someone explain to me?\n\
Can\'t you just count instead of doing complicated DP?\nI have not solved this question yet but I am not sure why DP is required.\nCan someone explain to me?\n\n```go\n// count all strings between s1 to s2\nfunc count(a, b string) int {\n    c := int(b[0] - a[0])\n    for i := 1; i < len(a); i++ {\n        c = c * 26 % modulo\n        c = (c + charSub(b[i], a[i])) % modulo\n    }\n    return c + 1 % modulo\n}\n\n// count all occurrences of evil string between s1 and s2\nfunc countEvil(a, b, evil string) int {\n  // TODO: still figuring this part out\n  // if len(a) - len(evil) == 1 => answer is always 1\n  // if len(a) - len(evil) > 1 => determine the count based on each digit\n}\n```
[]