educative.io

Educative

Error in material for findLongestSubstring

test case “abcdbea” fails using the provided solution. It outputs 5 as expected.


Course: Grokking Coding Interview Patterns in Java - Learn Interactively
Lesson: https://www.educative.io/courses/grokking-coding-interview-patterns-java/7AGpll3zzRO

Hey @Loic_Tregan

I tested the code on my end and it passed all the test cases. Can you please try running the code again and let me know if the issue persists? If it does, please provide the exact code you were using so I can investigate further.

Happy Learning :partying_face:

Hey @Loic_Tregan

I hope you are doing well,

We checked the test cases provided by us again and found no errors. The answer for the test case “abcdbea” is 5. This is because the longest substring in this test case is “cdbea.” This substring has no repeating characters.

As always, we appreciate our valued users reaching out to us. Therefore, please write to us if you have any further queries, concerns, or suggestions in general.

We hope you enjoy your experience with us at Educative! Happy learning!