7 kyu
Alphabet symmetry
3,929 of 15,203KenKamau
Description:
Consider the word "abode"
. We can see that the letter a
is in position 1
and b
is in position 2
. In the alphabet, a
and b
are also in positions 1
and 2
. Notice also that d
and e
in abode
occupy the positions they would occupy in the alphabet, which are positions 4
and 5
.
Given an array of words, return an array of the number of letters that occupy their positions in the alphabet for each word. For example,
solve(["abode","ABc","xyzD"]) = [4, 3, 1]
See test cases for more examples.
Input will consist of alphabet characters, both uppercase and lowercase. No spaces.
Good luck!
If you like this Kata, please try:
Strings
Fundamentals
Similar Kata:
Stats:
Created | Oct 8, 2017 |
Published | Oct 8, 2017 |
Warriors Trained | 26585 |
Total Skips | 2346 |
Total Code Submissions | 44652 |
Total Times Completed | 15203 |
Python Completions | 3929 |
JavaScript Completions | 4493 |
Lua Completions | 214 |
C# Completions | 669 |
Ruby Completions | 586 |
Haskell Completions | 194 |
Crystal Completions | 15 |
C++ Completions | 2246 |
Fortran Completions | 14 |
CoffeeScript Completions | 16 |
Dart Completions | 412 |
PHP Completions | 360 |
TypeScript Completions | 302 |
Go Completions | 692 |
Java Completions | 1119 |
Rust Completions | 256 |
Prolog Completions | 19 |
Clojure Completions | 48 |
Julia Completions | 23 |
Nim Completions | 20 |
C Completions | 163 |
COBOL Completions | 5 |
Total Stars | 299 |
% of votes with a positive feedback rating | 94% of 1821 |
Total "Very Satisfied" Votes | 1615 |
Total "Somewhat Satisfied" Votes | 180 |
Total "Not Satisfied" Votes | 26 |
Total Rank Assessments | 13 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 7 kyu |