Question d’entretien chez Intuit

pseudo code to check if a string is a palindrome

Réponse à la question d'entretien

Utilisateur anonyme

23 déc. 2011

Perhaps a bit more efficient: var palindrome = "dogeeseseegod" int x = 0; int y = palindrome .length-1; while(x <= y) { if(palindrome [x] != palindrome [y]) return false; x++; y--; } return true;

1