Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAWelcome to Week 75!! We have a few people vying for a new shiny badge!!
This challenge is based off the word game Scrabble. In the game of Scrabble, you are given 7 tiles with a letter printed on them. Additionally, a point value is assigned to the letters. The player tries to find the word that is worth the most points. For example, a player may draw the following 7 tiles: G (2 points), A (1 point), R (1 point), E (1 point), T (1 point), V (4 point). It is important to note that the longest word assembled is not always the best word – for example the word of ‘parget’ is worth less then ‘paver’.
The challenge this week is to find the best word (from a provided text file) that can be assembled from 7 provided letters. Use the workflow and the files attached to get to your solution.
Advanced Users and Challenge 75 Racers: The game of Scrabble also provides a max of 2 blank tiles. These tiles are a wildcard and can be used as any letter, but are worth 0 points. While it is unlikely that a single player has both blanks at a single time, we must be prepared for when it takes place. Try to find the highest scoring word using the blank tiles – but be sure that they are not scored!
Question... you say to make a word from the 7 tiles provided... but there are 8 tiles in the workflow? :)
Good call @NicoleJohnson. I just updated the file!
Solution attached for the no wildcards case. I'm trying to think about how to attack the wildcards...
Solution attached for the wildcards case.
Very very messy solution, but it is working :-)
My word that was difficult @JoeM!
I went for the one macro to rule them all approach, it is a horrible workflow and I'm not sure I could explain it back to anyone...just take my word for it...it works!
@SeanAdams I tip my hat to you sir, congratulations on being the first to get the 75 badge! Well played
*anxiously awaits 75 badge*
Darn it, @SeanAdams!! :)
But I made it. With a detour to fix my payroll system and to pick up my car from the shop whilst trying to solve it. So, you know. Monday as usual.
Thanks for the killer challenge, @JoeM! Looking forward to see where the climb takes us for Challenge #100 :)
Fun problem. I have a solution that runs sub second even with the blanks if you allow me to pre-compute a few tables. Of course it is taking advantage of awful stuff like regex. One example is:
regex_replace(hand, "(.)(.)(.)(.)(.)(.)(.)", regex_replace(p, "(.)", "$$$1"))
another:
regex_replace([Field_1], "(?<=^.{" + tostring(tonumber(left(p,1))-1) + "}).", ".")
I'll post in a few days if no one else comes up with a super fast solution...
Congrats @SeanAdams on your new shiny badge!
Climbing to the summit alone however could lead to a dangerous selfie situation. Hopefully your team will catch you soon.
Cheers,
Mark