Skip to content

Instantly share code, notes, and snippets.

@tabvn
Created November 10, 2018 03:24
Show Gist options
  • Select an option

  • Save tabvn/232cb548b3fdf4739411c70d4fcfad6a to your computer and use it in GitHub Desktop.

Select an option

Save tabvn/232cb548b3fdf4739411c70d4fcfad6a to your computer and use it in GitHub Desktop.
bool doiXung(string s, long long length){
if(length == 1){
return true;
}
bool dx = false;
long long i, j;
i = 0;
j = length - 1;
while(s[i] == s[j]){
if(i >= j){
dx = true;
}
i++;
j--;
}
return dx;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment