DEV Community

Discussion on: Algorithm 101: 6 Ways to Check if a Word is a Palindrome

Collapse
 
leonardosnt profile image
Leonardo Santos • Edited

That is what I would do.
That approach is also useful to reverse arrays, just swap 0th <-> (len-1)th and so on.