@GenialX Oooo thanks. bad design. should say "reply" or "comment" deleted.
@veeeee17 Very good solution (because it's the same as mine :-P) except I recommend using StringBuffers instead of Strings or else your complexity isn't really O(n) because every String + String operation actually copies the entire buffer.
No one has replied
the running time of solution may be lower ?cause you used loops. Although the method is directly solve this problem. Is an optimized method existed?
@benjamin19890721 Thank you!
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.