Check if String is Isogram | Data Structures & Algorithms | Programming Tutorials | GeeksforGeeks

preview_player
Показать описание
Our courses :

This video is contributed by Rahul Singla

Please Like, Comment and Share the Video among your friends.

Install our Android App:

If you wish, translate into the local language and help us reach millions of other geeks:

Follow us on Facebook:

And Twitter:

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

We can check whether characters are same while sorting. if same character, break the loop ...if it is sorted it means there are no same characters

sourabhbhandari
Автор

```
bool isIsogram(string s)
{
unordered_set<char> count;
for(char c:s){
if (count.find(c) == count.end())
count.insert(c);
else
return false;
}
return true;
}
```

lokeshsenthilkumar