Can we say that the Time Complexity will never be greater than 26 i.e no of total alphabets.
thus Time Complexity O(N + Albhabet)<O(26).
As we can can but a condition that :
if(string.length()>26)
{ cout<<"yes"<<endl;
continue; //goes to next loop
}
Thus, bonus Q-> min length of string required is 27 for ans to be always "yes" irrespective of any string you give as input.