Puzzle: Highest Scoring Word [reference]

Highest Scoring Word” is a coding puzzle that people can be attempted in the following languages: javascript, haskell, ruby, python, crystal, csharp, java, r, cpp, c, elixir, powershell, php, kotlin, scala, nasm, rust, and go.

  • Difficulty: 6 kyu
  • Stars: 935
  • Votes: 3164
  • Category: reference
  • Tags: Fundamentals, Strings, Data Types, Arrays, Numbers
  • Source: codewars

Description

Given a string of words, you need to find the highest scoring word.

Each letter of a word scores points according to its 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.

Solve It Here

Click the link below to solve it on Codewars:

Notes

This puzzle was posted by a Slackbot via a slash command. If you want to help work on the app, send a message to @Josh.

If you don’t want to see the coding puzzles when you visit the forum, you can go into your settings and mute the puzzles category.

1 Like

I did this one in Python and Elixir.