emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[QZ#5] Clarification on the expect output. #141

Closed JonathanKimchi closed 4 years ago

JonathanKimchi commented 4 years ago

Hope everyone is doing well. I'll make this concise. We've been given these cases:

  1. if "United States" is in the dictionary and "United Nations" is in the inputted string, then your algorithm should return no hits.
  2. if "America" is in your dictionary and "American" is in the inputted string, then your algorithm should return a hit.

I wanted to ask about a third case.

  1. If "United N" is in your dictionary and "United Nations" is in the inputted string, should the algorithm return a hit?

I would love some clarification on this topic. As of right now, my algorithm is going to return an ArrayList of Entities that includes those generated by the case listed above.

marvinquiet commented 4 years ago

Yes, it is just a string matching. If there is a hit in the dictionary, you should return it.