I was asked this question in an interview and I wrote a piece of code of O(n2).
how's it n^2? As theres only one while loop, no nested loops nothing... how can it be n^2 then?
for (int i=37; i < 130; ++i)
why is the iteration from 37 to 130? I didn't get it.... is it just for this particular string? or otherwise..?