Questions d'entretien

Entretien pour Senior Back End Engineer

-Querétaro, Querétaro

GE Power

Make a function to detect a palindrome word using only one string variable (the one passed as a parameter).

Répondre

Réponse à la question d'entretien

1 réponse

0

Using a for loop to compare each character of the word in a mirror-way, the first character against the last, the second against the second to last, and so on. Whenever a difference was found, the function returned false, otherwise, true was returned indicating the word was a palindrome.

Utilisateur anonyme le

Ajouter des réponses ou des commentaires

Pour commenter ceci, connectez-vous ou inscrivez-vous.