String concatenation in Java is O(N), which together with the loop over the 
input makes your solution O(N^2).

Outputing the answer char by char right away in the loop would be one way to 
get around this.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/178bc61f-34f3-4578-90ec-d87fd98a36fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to