Alphabet Symmetry

Determines the number of letters in a word that match their alphabetical position.

Easy1/4/2024

Problem statement

Given a string, return the number of letters in the string that match their alphabetical position. For example, given the string "aoc", return 2 since "a" and "c" appear in the string at positions 1 and 3, respectively.

Problem leaderboard

#
Size
%
Users
#1
47 c.
Top 28%
+1
voytxt
Rag
helbling
lydxn
Irratix
tree
fuzzylojik-golf
Steffan
Natanaelel
Shanethegamer
#2
48 c.
Top 38%
Europe2048
Salutations45
two-bad
sisyphus-ppcg
#3
49 c.
Top 43%
Tony
val
#4
52 c.
Top 50%
scpchicken
josex2r
davyboyh
#5
53 c.
Top 57%
Thomasdcrt
AlephSquirrel
madeforlosers
#6
54 c.
Top 75%
Bull
Mif712
alexisab
SXW172P_thdgit
Logicer
sean
maximec-indy
#7
56 c.
Top 80%
SephQ
MaelkMark
#8
57 c.
Top 88%
albanian-laundromat
KrausRaus
ComputerKWasTaken
#9
60 c.
Top 90%
Pascal
#10
61 c.
Top 93%
goodwyna21
#11
68 c.
Top 95%
XenThe
#12
268 c.
Top 98%
Luke
#13
836 c.
Top 100%
Alex