Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error with a specific set of words #3

Open
hazem-taha opened this issue Sep 13, 2021 · 5 comments
Open

Getting error with a specific set of words #3

hazem-taha opened this issue Sep 13, 2021 · 5 comments

Comments

@hazem-taha
Copy link

Please check the below screenshot..

image

Please help, thanks

@kivenZhou
Copy link

I have the problem too, give you a resolve,find src/demo.js,line 21-22,add ‘px’ at last。and find line45-46, add ‘px’ too, your problem will reslove

@hazem-taha
Copy link
Author

@kivenZhou
Thank you, I tried but still did not solve..

@gaoryrt
Copy link
Owner

gaoryrt commented Oct 9, 2021

@hazem-taha
Seems like the question raised in your screenshot could not be solved by these code.
In this special case, word KITTEN could not be inserted, so the code ran wrong.
After delete the word KITTEN, it works again.

@hazem-taha
Copy link
Author

hello @gaoryrt

Yes exactly this is the case, but how to fix this ? as I don't have control on the words the user enters to create the puzzle and this is a bug behavior as far as I understand..

Thanks in advance.

@gaoryrt
Copy link
Owner

gaoryrt commented Oct 11, 2021

@hazem-taha
To ensure that the input has a solution, the code first sorts the input by word's length
You can try to replace this part using the user-input order
As long as the user ensures that the order of the inputs have a solution, the code will have one too
This is the easiest way I can think of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants