What is the most elegant way to check if a binary representation of an integer is a palindrome? Suppose the integer is 32-bit.
Without shifting bits iteratively, can we achieve this? Any code snippet will be highly welcome.
I noticed the post How to check if the binary representation of an integer is a palindrome?, but it is done by bit shifting. Are there any other methods?
Thanks a lot in advance!