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%
Natanaelel
lydxn
Shanethegamer
Irratix
tree
fuzzylojik-golf
voytxt
helbling
Steffan
#2
48 c.
Top 34%
Salutations45
sisyphus-ppcg
two-bad
#3
49 c.
Top 40%
Tony
val
#4
50 c.
Top 43%
Lv0Sys
#5
52 c.
Top 51%
davyboyh
josex2r
scpchicken
#6
53 c.
Top 60%
madeforlosers
Thomasdcrt
AlephSquirrel
#7
54 c.
Top 77%
SXW172P_thdgit
sean
Mif712
alexisab
Logicer
maximec-indy
#8
56 c.
Top 83%
SephQ
MaelkMark
#9
57 c.
Top 91%
albanian-laundromat
ComputerKWasTaken
KrausRaus
#10
60 c.
Top 94%
Pascal
#11
61 c.
Top 97%
goodwyna21
#12
836 c.
Top 100%
Alex