Question d’entretien chez Jet

Write an algorithm to determine if a string is a palindrome.

Réponses aux questions d'entretien

Utilisateur anonyme

6 août 2015

With a good algorithm.

Utilisateur anonyme

19 févr. 2016

string pal = "abcba"; bool isPalindrome = true; int length = pal.Length; for (int i = 0; i < (int)length / 2; i++) { if (pal[i] != pal[length - i - 1]) { isPalindrome = false; break; } }