Skip to content

Instantly share code, notes, and snippets.

@edussx
Last active December 13, 2015 20:28
Show Gist options
  • Save edussx/4970428 to your computer and use it in GitHub Desktop.
Save edussx/4970428 to your computer and use it in GitHub Desktop.
CareerCup 1.1
//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