Your task is to transform one word into another, with four operations: add a letter, delete a letter, change a letter, and take an anagram of the existing word. Additionally, you have to obey the following rules:
-Every interim step between the first and the last word must also be a word
-No interim step can be less than three letters
-The first line of input will contain the “cost” of each operation in the order above
-The second line of input will contain the starting word
-The third line of input will contain the ending word
Your goal is to find the lowest possible “cost” of transforming the starting word into the ending word. You can use any word list you like -- feel free to include your word list or a link to it as part of your solution. (Depending on your word list, your answer might not be exactly the same as ours below.)
Your solution should detect and handle invalid input, and return -1 if there is no solution.
Example input:
1 3 1 5
HEALTH
HANDS
(output: 7) (HEALTH - HEATH - HEATS - HENTS - HENDS - HANDS)
(If your dictionary doesn’t have a couple of these words in there, don’t worry -- you’re scored on your code, not your word list.)
1 9 1 3
TEAM
MATE
(output: 3) (TEAM - MATE)
7 1 5 2
OPHTHALMOLOGY
GLASSES
(output: -1)
hi..i am good at core java programming using data structures and algorithms. i can help you write the program as per given specs. please contact me as soon as possible for a discussion.
i have my own strategy to work in java. i am using below technology.
Java and advance java
jsp,jstl,hibernate,json
tools : myeclipse for spring. mysql workbench,maven dependency
i have my own jar file made to work in java to save time.
Hi there,
How are you?
I am an experience developer on mobile (Android, iOS). I have completed many projects in mobile in the last 10 years. It is mean I have strong skill to complete your project.
Cheers,
Hello!
I've read your requests.
I have a full of experiences with Java Programming and I'd finished some projects like this.
I can do your task quickly and clearly.
Hope your kind contact and let us discuss about this project.
Thanks!