New answers tagged palindrome
1
vote
0
votes
Number of string permutations that are palindromes
Vyxal 3, 5 bytes
⑴/⇄⧖∑
Vyxal It Online!
...
0
votes
Add Y to X to get a palindrome
Desmos, 137 bytes
q(x,n)=floor(mod(x/10^n,10))
l=floor(log(x+y)+1)-1
f(x,y)=\left\{(q(x+y,[l...0])-q(x+y,[0...l]))^2.total=0:y,f(x,y+1)\right\}
g(x)=f(x,0)
Graph ...
0
votes
Add Y to X to get a palindrome
AWK, 76 bytes
{for(i--;!z;i++){b=X;for(j=0;j++<split($0,a,X);)b=a[j]b;b==$0++&&z++}}1,$0=i
Attempt This Online!
1
vote
Add Y to X to get a palindrome
Perl 5, 60 + 1 (-n option) = 61 bytes
$==0;$_++,$=++while@_=/./g,grep$_[$_++]-$_[-$_],0..$#_;say$=
Try it online!
0
votes
Add Y to X to get a palindrome
Haskell, 45 bytes
f n=[x-n|x<-[n..],show x==(reverse.show)x]!!0
Try it online!
Tried (==).reverse<*>id$show x as the ...
1
vote
2
votes
Top 50 recent answers are included
Related Tags
palindrome × 105code-golf × 92
string × 33
number × 16
sequence × 14
decision-problem × 12
restricted-source × 10
base-conversion × 10
math × 8
code-challenge × 8
integer × 7
number-theory × 4
primes × 4
quine × 4
binary × 4
permutations × 4
source-layout × 4
tips × 3
date × 3
python × 3
polyglot × 3
subsequence × 2
balanced-string × 2
fastest-algorithm × 2
bitwise × 2