
Script to find whether words can be formed using letter arrays
- or -
Post a project like this1631
£150(approx. $202)
- Posted:
- Proposals: 8
- Remote
- #3358944
- OPPORTUNITY
- Awarded
WordPress Expert✮Shopify Expert✮Graphic Designer✮AutoCAD 2D & 3D✮CV Writer & Designer✮Fullstack developer

Creative Graphic Designer & Front-End Web Developer with Expertise in UI/UX Design

557555236365732272394549071417538156947896022446200126
Description
Experience Level: Entry
Estimated project duration: less than 1 week
I am looking for someone to write a script to do the following. I would like something that I can easily integrate into a WordPress site, so probably PHP, although open to other options.
The script needs to do the following:
Script will contain 10 distinct arrays - each containing 6 letters. User inputs a word, and the script returns a value of "yes" or "no" depending on whether the word can be made using a maximum of one letter from each array.
10 fixed arrays:
1: {a b c d e f}
2: {a c d k n x}
3: {a b e g j z}
4: {b n s u v y}
5: {c d i l q t}
6: {a f h o p r}
7: {c d m n s t}
8: {e i k p w y}
9: {e j l o p x}
10: {c d g n r t}
Example 1:
Input word = "navigation"
Output = "yes"
Explanation - navigation can be made using "n" from array 2, "a" from array 1, "v" from array 4, "i" from array 5, "g" from array 3, "a" from array 6, "t" from array 7, "i" from array 8, "o" from array 9, and "n" from array 10.
(Note, there may be more than one way to make the same word, but we are only interested in if it is possible using at least one combination).
Example 2:
Input word = "fish"
Output = "yes"
Explanation - fish can be made using "f" from array 1, "i" from array 5, "s" from array 4 and "h" from array 6.
Example 3:
Input word = "puppy"
Output = "no"
Explanation - puppy cannot be made using one letter from each array. Puppy requires 3xP, 1xU and 1xY. Although these letters are all present, they are not present in 5 different arrays. U and Y are both in the same array, and the only other Y is in an array with one of the 3 required Ps. Therefore it is NOT possible to make the word puppy using a maximum of one letter from each array.
The script needs to do the following:
Script will contain 10 distinct arrays - each containing 6 letters. User inputs a word, and the script returns a value of "yes" or "no" depending on whether the word can be made using a maximum of one letter from each array.
10 fixed arrays:
1: {a b c d e f}
2: {a c d k n x}
3: {a b e g j z}
4: {b n s u v y}
5: {c d i l q t}
6: {a f h o p r}
7: {c d m n s t}
8: {e i k p w y}
9: {e j l o p x}
10: {c d g n r t}
Example 1:
Input word = "navigation"
Output = "yes"
Explanation - navigation can be made using "n" from array 2, "a" from array 1, "v" from array 4, "i" from array 5, "g" from array 3, "a" from array 6, "t" from array 7, "i" from array 8, "o" from array 9, and "n" from array 10.
(Note, there may be more than one way to make the same word, but we are only interested in if it is possible using at least one combination).
Example 2:
Input word = "fish"
Output = "yes"
Explanation - fish can be made using "f" from array 1, "i" from array 5, "s" from array 4 and "h" from array 6.
Example 3:
Input word = "puppy"
Output = "no"
Explanation - puppy cannot be made using one letter from each array. Puppy requires 3xP, 1xU and 1xY. Although these letters are all present, they are not present in 5 different arrays. U and Y are both in the same array, and the only other Y is in an array with one of the 3 required Ps. Therefore it is NOT possible to make the word puppy using a maximum of one letter from each array.
J W.
100% (2)Projects Completed
2
Freelancers worked with
1
Projects awarded
67%
Last project
6 Aug 2021
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies