[Solved] working of these two lines of code in the program [closed]
The total variable will contain the number of unique characters in the array str. This happens because you increment the count(total+=!used[str[i]-‘a’]) only if you haven’t already marked the character as visited. If you incremented it, you mark it as such in the next line (used[str[i]-‘a’]=1) so that you wont count it again. The notation str[i]-‘a’ … Read more