Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren- 1
palindrom
how checj condition for palindrome
1 Antwort
+ 2
There are several ways: 1) invert the order of the word/phrase, and check whether the result is identical to the original one. 2) traverse the word/phrase from the beginning and from the end at the same time, until you get to the middle. If the traversed characters are equal from the beginning and from the end, it's a palindrome.