Scrabble puzzle discussion

I have the same probleme with test number 3. Can I have the validator by PM ?

Thanks

I finally find my little mistake. Thank you :slight_smile:

Hey uh I think there’s a mistake in 2 : two words same value. If I refer to the values table, have has a value of 4+1+4+1 = 10 and potsie has a value of 3+1+1+1+1+1 = 0.
This would mean have is a better choice than potsie, but the expected answer is potsie… have I made a calculation error or is the expected answer wrong ?

You should return the best possible word with the given letters in the last line.

In test case 2, you are given the letters sopitez, you cannot form the word have with these.

1 Like

duh I’m a retard

All the tests passed, except the “Value better than size” submission test. It passed in IDE, I’ve debugged it, it works correct. So I don’t have an idea what to do.

Hi,
I have exactly the same problem in php.
help meeee!

image
Hi,

I have been confused the question statement. In the output requirement, it says that each letter can be used maximum once. But the example has “Which” as the result which has two “h”. Anyone can help with this?

1 Like

“using the available letters” … “Each letter must be used at most once in the solution”

there are 2 h in availble letters : hicquwh

2 Likes

Hi, I am having an issue! All my tests pass fine in the IDE but when i submit my code, no.3 - “Two words with different values” does not pass. I dont see how this is possible as nothing has been hard-coded. I suspect a bug on their end. I am using c++. Anything else with similar problem?

Hey,

Also have the exact same problem but using c++!!!

There’s no bug on the puzzle.
“The validators differs from the test cases to avoid hard-coded solution.” doesn’t mean that the validation will fail only if your solution is hard-coded, that only mean that the validators and test cases are different.
The explication is that your code doesn’t perfectly handle the “Two words with different values” case, but pass the test by chance and fail in a similar but different situation on the validator.

2 Likes

Hi

I get that, but the fact it’s failing on that test of them all. How could it not work on 2 words with different scores but work on more than 2 words with different scores. It’s also suspect that this exact thing has happened to multiple other users, always only that test that it fails on. I could be wrong and there is just something I am missing but for the life of me I can’t think of anything.

You’re missing something. :wink:
More than 12K players solved this puzzle, and I just re-submitted my code to answer you and it works perfectly.
The fact that a lot of players are encountering the same problem is simply because it’s a difficult point of the problem, no bugs here.

I swear i have looked at this code for hours and i just don’t get it.
Every scenario i present to my code works properly, i just cant understand what the validators could be that is causing my code to fail.
This is insanely frustrating lol :sweat_smile:

This test verify if your solution always choose the word with the higher letter values. Are you sure of this part of your code ?

Yup because it passes the next test, the one with lot’s of words, it also chooses the first in the list if two words have the same score.

After a pm discussion with @Jamesythelegend and a review of his code, I finally found the error, but it was not obvious at all. So, to help people who could have the same problem, here is a complementary test case.
Inputs:

2
fiz
fbc
ffibce

Output:

fbc

To use it, open the settings on the left of the IDE, and enable “expert mode”. Then, in the tests zone, you will have a tab named “CUSTOM”, you can put it there.

3 Likes

Hi, i also have the problem for validating the “2 words with different values” part.

All my test are OK and when I submit all is OK but not this testcase.

I have played your custom testcase and it work… So I really don’t know why my code fail the validation.

Hey.
So it’s possibly another problem… I can take a look to your code if you want. You can send it by pm.
@TwoSteps since this validator seems to be more problematic than its corresponding testcase with no hint of why, an update of the testcase could be a good thing.

1 Like