We have an eccentric Scrabble playing client who sometimes requests us to write software that can help them train for their Scrabble matches, and the client has a new request.
This time around, they would like to be able to run a specific program, that given a sentence, will replace each word in the sentence with another word starting with the same letter that is the same length. If a particular word can’t be found that matches the criteria above, then the original word should be returned. Another requirement is that the same input should return a different output each time. Said another way, the word that is picked should be any random word that fulfills the criteria.
Given the sentence lightly fried fish are delicious, the program may return likable frier frog arm delegated. Running it again may yield lenient fuses foam any digressed.
The client trains for his Scrabble matches using the 370000 word list here: https://github.com/dwyl/english-words/blob/master/words_alpha.txt. The solution should therefore use this same word list to generate the new sentences.
Create a solution that will allow our client to input their sentence and get their desired output.
Assume the client is of moderate technical competence (for example they know how to paste commands into a terminal), but is not a developer themselves, so you should clearly explain how to get the solution working on their own machine.
This is an open ended question that can be achieved with any technology or approach you are comfortable with, but since this is an evaluation for a development position, we assume that some code will be involved, so we require the solution to be submitted in the form of a git repository on a hosted source control platform like Github, Gitlab, Bitbucket etc.
The purpose of this task is for us to understand the way you think and work and to allow us to get some insight into your technical abilities. Please do not spend more than a few hours on this task - perfection is neither expected nor desired, but a working (or almost working) solution is.
Good luck! If you have any questions about this task, feel free to get in touch with the person that sent this evaluation your way.