Skip to content

算法有点问题? #1

Description

@picone
  1. j应该从1开始?因为第一个字符肯定是符合的
    KeywordManager.cs:43
for (int j = 0; j <= Math.Min(keywordDict.MaxWordLength, text.Length - index - 1); j++)
{
    ...
}
  1. word字典可以使用<string, Boolean>, 没有必要存多一次字典的键名浪费空间
  2. fastLengthCheck使用short存放,如果字典里关键词的长度比short的长度长,会出问题

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions