Isn’t the assumption of 13.9 solutions that: there are no duplicate words in Q? Otherwise I do not think count_Q.size() == Q.size() will work. If so, please clarify this no duplication assumption in future versions.
Thanks
Jeffrey
Isn’t the assumption of 13.9 solutions that: there are no duplicate words in Q? Otherwise I do not think count_Q.size() == Q.size() will work. If so, please clarify this no duplication assumption in future versions.
Thanks
Jeffrey
Hey Jeffery,
You are right, there is no duplication in Q. You can think about this as the scenario of a search engine query we rarely type duplicate words in the search bar. Another way to deal with this problem is scanning Q first and eliminates the duplicates in Q, which is probably not this problem originally looks for. Anyways, thanks for bring this issue up, and we definitely would mention this in the future version.
Tsung-Hsien