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 26%
lydxn
Natanaelel
Irratix
fuzzylojik-golf
voytxt
Shanethegamer
Steffan
tree
#2
48 c.
Top 35%
Salutations45
two-bad
sisyphus-ppcg
#3
49 c.
Top 42%
Tony
val
#4
50 c.
Top 45%
Lv0Sys
#5
52 c.
Top 55%
davyboyh
scpchicken
josex2r
#6
53 c.
Top 65%
AlephSquirrel
Thomasdcrt
madeforlosers
#7
54 c.
Top 84%
maximec-indy
alexisab
SXW172P_thdgit
Logicer
sean
Mif712
#8
56 c.
Top 87%
SephQ
#9
57 c.
Top 94%
ComputerKWasTaken
KrausRaus
#10
60 c.
Top 97%
Pascal
#11
61 c.
Top 100%
goodwyna21