New answers tagged palindrome
0
votes
Binary representation of a number is palindrome or not?
Thunno 2, 12 bytes
ḃḲQ"YESNO"½i
Attempt This Online!
Unfortunately, the Thunno 2 dictionary only holds words which are 4 letters or more, so neither <...
0
votes
Binary representation of a number is palindrome or not?
Python, 84 Bytes
f=lambda x:['NO','YES'][int(bin(x)[2:]==(bin(x)[2:])[-1::-1])]
print(f(int(input())))
Try online on TIO
If just a pure function was allowed:
Try ...
2
votes
Binary representation of a number is palindrome or not?
Arturo, 47 bytes
print(=reverse<=as.binary do arg\0)?->'YES->'NO
2
votes
Binary representation of a number is palindrome or not?
JavaScript, 75 bytes 69 bytes
alert((a=[...(+prompt()).toString(2)]).some(x=>x-a.pop())?"NO":"YES")
Try it online!
A different approach ...
1
vote
1
vote
Binary representation of a number is palindrome or not?
Nibbles, 11.5 11 bytes (22 nibbles)
Edit: -1 nibble thanks to xigoi
?==;``@$\@"YES" "NO"
...
4
votes
Binary representation of a number is palindrome or not?
Vyxal, 85 bitsv1, 10.625 bytes
-6 bits thanks to @lyxal
-3 bits thanks to @the-thonnu
bḂ≠`∨ȯno`½iN
Try it Online!
...
0
votes
User Appreciation Challenge #1: Dennis ♦
Python 3, 65 bytes
lambda s:(l:=[c in'aeiou'for c in s.lower()if'`'<c<'{'])==l[::-1]
Try it online!
1
vote
1
vote
User Appreciation Challenge #1: Dennis ♦
Scala 3, 78 bytes
Golfed version. Attempt it online!
_.filter(_.isLetter).map(c=>"aeiou".contains(c.toLower)).pipe(c=>c==c.reverse)
Ungolfed ...
1
vote
User Appreciation Challenge #1: Dennis ♦
Arturo, 58 bytes
$=>[=reverse<=map replace&{/\p{^L}}""=>[in?&"aeiouAEIOU"]]
Try it
Top 50 recent answers are included
Related Tags
palindrome × 95code-golf × 83
string × 29
number × 14
sequence × 12
decision-problem × 11
restricted-source × 10
base-conversion × 8
code-challenge × 7
math × 6
integer × 6
primes × 4
quine × 4
permutations × 4
source-layout × 4
number-theory × 3
tips × 3
date × 3
binary × 3
python × 3
polyglot × 3
subsequence × 2
balanced-string × 2
fastest-algorithm × 2
factoring × 2