Комментарии:
Thank you so much for this. I was doing the Reverse Integer problem on Leetcode and decided to try to do it using string manipulation, and I was surprised how slow it was compared to other methods. If you don't mind me asking, why were strings designed this way? Are there any cases where Strings would be better than StringBuilders other than just convenience?
It seems to me that Strings should just act this way under the hood to be faster, but I assume I'm just not seeing the big picture. There has to be some reason Strings need to be immutable, right?
You deserve more views
ОтветитьVery nice video! Thank you!
Ответить