Considering below code:
str="abc"
str*="def"
Is the new string "def" just be appended after the memory space of "abc", 
or both strings were copied to a new momory space? Is str*="def" equal to 
str=str*"def" and str="$(str)def" in speed and memory level? Is below code 
in O(n) or in O(n^2) speed?

s=""
for i=1:10000
    s*=string(i)
end

Reply via email to