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 29%
+1
Natanaelel
lydxn
Shanethegamer
Irratix
tree
fuzzylojik-golf
Lv0Sys
voytxt
Rag
Steffan
#2
48 c.
Top 37%
Salutations45
sisyphus-ppcg
two-bad
#3
49 c.
Top 42%
Tony
val
#4
52 c.
Top 50%
davyboyh
josex2r
scpchicken
#5
53 c.
Top 58%
madeforlosers
Thomasdcrt
AlephSquirrel
#6
54 c.
Top 76%
maximec-indy
Logicer
alexisab
Mif712
sean
SXW172P_thdgit
Bull
#7
56 c.
Top 82%
MaelkMark
SephQ
#8
57 c.
Top 89%
ComputerKWasTaken
albanian-laundromat
KrausRaus
#9
60 c.
Top 92%
Pascal
#10
61 c.
Top 95%
goodwyna21
#11
68 c.
Top 97%
XenThe
#12
836 c.
Top 100%
Alex