Using s1+s2 string concatenation vs "".join()

  • 0

    What is the preferred method in interviews. Have you ever been told not to use s1+s2 to concatenate strings? I would assume that since strings are immutable, you should rather use .join because you're copy entire strings over.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.