This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given some text, write a function to find the max word letter span and list of words with that span | |
# Word letter span is defined as the alphabetical distance in between the first and last letters of the word | |
# Rules | |
# The same two letters produce the same span regardless of their order in the word | |
#. “PAT” and “TAP” have span 4 | |
# Capitalization does not matter | |
#. “Pat” and “pat” have span 4 | |
# Words that begin and end with the same letter have a word span of 0 |
OlderNewer