Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
How to determine is the string palindrome or not?
Describe the best algorithm you think (programming language no important, use words to describe algorithm steps).
4 Respostas
+ 1
some languages have a built in function to reverse a string but assuming you dont you could split the string up into single characters and use a for loop to go through them from last to worst to reconstruct the string backwards then check if its the same as the original string.
0
Take a look on my approaches:
https://code.sololearn.com/c8OLa6oPvk6V/?ref=app
https://code.sololearn.com/cKX1twtIeLb0/?ref=app
0
Here are my new tries, now using Python:
https://code.sololearn.com/ckzKZUhvplvr/?ref=app
https://code.sololearn.com/cdb28fBq2f90/?ref=app