String str;
cin>>str;
for(int i=0;i<str.length();i++){
....
}
if str.length()=n, then the total complexity of the algorithm is n*n?? or just n?
String length complexity...
String str;
cin>>str;
for(int i=0;i<str.length();i++){
....
}
if str.length()=n, then the total complexity of the algorithm is n*n?? or just n?