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 35%
Irratix
tree
fuzzylojik-golf
voytxt
Steffan
Natanaelel
Shanethegamer
lydxn
#2
48 c.
Top 43%
sisyphus-ppcg
two-bad
#3
49 c.
Top 52%
Tony
val
#4
52 c.
Top 61%
scpchicken
davyboyh
#5
53 c.
Top 74%
Thomasdcrt
madeforlosers
AlephSquirrel
#6
54 c.
Top 87%
maximec-indy
alexisab
sean
#7
57 c.
Top 96%
ComputerKWasTaken
KrausRaus
#8
60 c.
Top 100%
Pascal