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 30%
+1
voytxt
Rag
helbling
Irratix
Natanaelel
Shanethegamer
lydxn
Steffan
tree
fuzzylojik-golf
#2
48 c.
Top 38%
Salutations45
two-bad
sisyphus-ppcg
#3
49 c.
Top 43%
Tony
val
#4
52 c.
Top 51%
josex2r
scpchicken
davyboyh
#5
53 c.
Top 59%
Thomasdcrt
AlephSquirrel
madeforlosers
#6
54 c.
Top 78%
Mif712
maximec-indy
alexisab
SXW172P_thdgit
Logicer
sean
Bull
#7
56 c.
Top 84%
SephQ
MaelkMark
#8
57 c.
Top 92%
ComputerKWasTaken
albanian-laundromat
KrausRaus
#9
60 c.
Top 95%
Pascal
#10
61 c.
Top 97%
goodwyna21
#11
836 c.
Top 100%
Alex