[Go] Array and string - Immutable String - Problems & Solutions
Beware of String Concatenation in Java Code Java // "static void main" must be defined in a public class. public class Main { public static void main(String[] args) { String s = ""; int n = 10000; for (int i = 0; i < n; i++) { s += "hello"; } } } Go func main() { var s string = "" var n int = 10000 for i := 0; i < n; i++ { s += "hello" } } https://go.dev/play/p/08cAfn65srV Solution Code(Convert ..
Go/Leet Code
2022. 4. 2. 17:56