+ 1
How to get longest substring in a string with no repeating character??
2 Respostas
+ 2
Here's one way to do it (using set):
https://code.sololearn.com/cM8B5fwuXPgm/?ref=app
Actually read the tags, and realized there's no C++. Anyway, here's Java translation:
https://code.sololearn.com/clF7bxqRWd54/?ref=app
Sorry if there are more bugs than lines of code. I'm not familiar with Java at all. Consider it a 'googletranslate'.
0
The code I've posted here was broken. It didn't work in many cases. I think I've fixed it now. Still not sure how to test it though.