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 27%
+1
voytxt
Steffan
helbling
Rag
lydxn
Shanethegamer
Irratix
tree
fuzzylojik-golf
Natanaelel
#2
48 c.
Top 39%
two-bad
sisyphus-ppcg
Salutations45
Europe2048
smclaughlin-cf
#3
49 c.
Top 44%
val
Tony
#4
52 c.
Top 51%
josex2r
davyboyh
scpchicken
#5
53 c.
Top 59%
madeforlosers
Thomasdcrt
AlephSquirrel
#6
54 c.
Top 76%
alexisab
Bull
SXW172P_thdgit
Mif712
maximec-indy
Logicer
sean
#7
56 c.
Top 80%
SephQ
MaelkMark
#8
57 c.
Top 88%
KrausRaus
albanian-laundromat
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