Last active
December 13, 2015 20:28
-
-
Save edussx/4970428 to your computer and use it in GitHub Desktop.
CareerCup 1.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CareerCup 1.1 | |
//by edussx | |
#include <string> | |
//assume the given string is a c++ string | |
bool ifUnique(std::string s) | |
{ | |
for(int i = 0; i < s.size()-1; i++) | |
{ | |
for (int j = i+1 ; j < s.size(); j++) | |
{ | |
if (s[i] == s[j]) return false; | |
} | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment