Given a string of words, you need to find the highest scoring word.
Each letter of a word scores points according to it's position in the alphabet: a = 1, b = 2, c = 3 etc.
You need to return the highest scoring word as a string.
If two words score the same, return the word that appears earliest in the original string.
All letters will be lowercase and all inputs will be valid.
'매일매일개발 > Codewars' 카테고리의 다른 글
codewars #40 What's a Perfect Power anyway? (5kyu) (1) | 2018.05.14 |
---|---|
codewars #39 Help the bookseller ! (6kyu) (1) | 2018.05.10 |
codewars #37 Count the smiley faces! (6kyu) (1) | 2018.05.08 |
codewars #36 The Supermarket Queue (6kyu) (1) | 2018.05.07 |
codewars #35 Persistent Bugger. (6kyu) (1) | 2018.05.04 |