Skip to content

Instantly share code, notes, and snippets.

@ajinkya933
Created January 2, 2017 18:26
Show Gist options
  • Save ajinkya933/a31bc66b79b7393dc5834bb61a0d27b0 to your computer and use it in GitHub Desktop.
Save ajinkya933/a31bc66b79b7393dc5834bb61a0d27b0 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
using namespace std;
bool IsCharDuplicate(String s)
{
for (int i = 0 ; i < s.length; i++)
for (int j = i+1; j <s.length ; j++)
if (s[i]==s[j])
return true;
return false;
}
int main() {
std::cout << "Hello, World!" << std::endl;
IsCharDuplicate(Ajinkya);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment