Closed mihirpatil001 closed 4 years ago
do we need to return for the first element the most frequent candidate without regard to prefix?
Not quite sure I get the point. Could you provide some clues about where it requires returning candidates without prefix?
I guess I'm trying to ask: Does the most frequent candidate returned depend on the prefix, or are we just using the most frequently picked candidate overall?
So in the example above, “shy” is picked the most when prefix is “sh”. But if we use a different prefix such as “ai”, would “shy” still be considered the most frequent candidate to be returned first? Or would “shy” not be, since “shy” was not the most frequently picked candidate for the prefix “ai”?
Thanks for the detailed response.
I guess I'm trying to ask: Does the most frequent candidate returned depend on the prefix, or are we just using the most frequently picked candidate overall?
For the majority of cases, candidates rely on prefix. In other words, "shy" not returned if prefix is "ai".
Unless some special case, please refer to https://github.com/emory-courses/dsa-java/issues/146
For the extra credit portion, do we need to return for the first element the most frequent candidate without regard to prefix? Or should the most frequent candidate be prefix-dependent? For example, if we did: