Clarification on UNQ_C7 in C2_W1_Assignment


Could you provide more clarification on Question 7 in C2W1 Assignment regarding whether the answer contains duplicates:

For the given example word “at”, I get 76 words with insert modification, instead of 78. My code eliminates the duplicates of “aat” and “att” , compared to the expected output.


Hi, Sandyj.

You are right - insert_letter() function does produce some duplicates, but it does not matter too much because in Exercise 8 when we combine all the edits we remove the duplicates again. So I think this is for efficiency - deduplicating once.

I found this issue, too. This could be a factor for some that they miss points from the grader. It makes me a bit uneasy having only 2 tests out of six passing due to this issue.

Of course, not checking for duplicates does allow me to get around this problem.