Following aure's suggestion, I first write some tests.
As a result, #35 has some problems. I'm sorry.
I have considered several possibilities, but it seems to me that the condition "newLetter is B" or "newLetter is not C" is necessary.
So I think the handling written in #26 is fine, but this one has less time complexity.
26
I took care of this issue.
Following aure's suggestion, I first write some tests. As a result, #35 has some problems. I'm sorry.
I have considered several possibilities, but it seems to me that the condition "newLetter is B" or "newLetter is not C" is necessary. So I think the handling written in #26 is fine, but this one has less time complexity.