Because a String is immutable, a String concatenation of the form str1+=str2 takes time that is proportional to the length of the resulting string, even if str2 is very short. What is the running time of the code in Figure 15, assuming that the array has N items?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here