grant, can you please add an example to explain how you dealt with the multiplier and 'existing_letter' in this problem?
It seems that "existing_letter" is fixed on 8th position.
@Jan, thanks :)
That is correct. I've added the 8th position fixed point to the description. I've also fixed one of the multiplier strings in the test cases that was accidentally 16 instead of 15 characters long (it's hard to distinguish between three versus four spaces).
Are you also assuming that the length of the word is no more that 8 if the "existing_letter" is either the first or the last letter of the word? Also, if the "existing_letter" is the middle letter of the word, then the length or the word is assumed to be no more than 15. Is that right?
The assumption (I thought this was explicitly stated in a previous problem) is that we're following Scrabble rules, which involve seven tiles per player. That being the case, eight letters is the longest word that can be played, and the existing letter can range anywhere from the first to the last letter of the word. The 15-character window simply represents all the tiles that can be played on (existing tile plus seven to each side). The word will be played at some point in that 15-character window, though no longer than eight characters.
Thanks for the clarification!
Return the 3n+1 sequence for n
Find the "ordinary" or Euclidean distance between A and Z
Find Rotated Substring
Return the first and last characters of a character array
NO _________ ALLOWED....
Calculator spelling - Letters to Numbers
Rule of mixtures (composites) - upper bound
Divisible by n, Composite Divisors
Legend of Zelda - Rupee Count (Item Purchase)
Lights Out 8 - 5x5, light-only solution? I
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office