>First of all let me thank you for your time answering me
Hey, no problem. Its kinda fun trying to recall stuff youve spent years on trying to forget
So, we came to the conclusion you where right, retrieval is immediate and all that.
----
Leaving that subject and assuming that t[n] retrieval did infact require a 1..n iteration:
(1) while(i<=n) is O

.
(2) t[n] retrieval is O

.
(3) The whole tingie is O(n
2) since for every (1) you'd do a (2).
Ie wouldn't it infact be a nested iteration?
>has it to do with inner traversing a string char by char. perhaps?
Well I thought like "if I copy n bytes from here to there that'd mean some kind of traversal" (as it infact does), but that had nothing to do with the "outer" algorithm's complexity, which the original problem was about. I just shot my self in the foot (I didnt fail the exam as I recall it, I did get some points for effort
/Per
if (typos) cout << "My fingers are faster than my brain. Sorry for the typos.";