0

The function with two parameters: an array of well-known words and word on who will conduct the search

Hi guys! Help pls me with this junior task. """We have all seen how the search engine understands the wrong words and offers us the correct option "Perhaps you mean ...". In this task, you need to implement something like this. The function takes two parameters: an array of well-known words and word on who will conduct the search. Your task - to find out what is the word from the list of the most similar to the transmitted. The similarity describes the minimum number of letters that can be added, removed or replaced in order to pass the word to get out of any word from the list. The smaller the amount of change, the higher the similarity between these two words.""" For example: entrance: function Dictionary(['stars', 'mars', 'wars', 'codec', 'codewars'], 'coddwars'); Exit: "codewars"

6th Aug 2018, 11:41 AM
Arthur P
Arthur P - avatar
3 Réponses
0
Ex function Dictionary(['bulb', 'light', 'bulblight', 'lightbulb']); exit: lightbulb
6th Aug 2018, 11:55 AM
Ethan
Ethan - avatar
0
What is your question?
6th Aug 2018, 11:59 AM
Qwertiony
Qwertiony - avatar
0
create such a function that inputs "function Dictionary(['stars', 'mars', 'wars', 'codec', 'codewars'], 'coddwars');" and returns "codewars"
6th Aug 2018, 12:00 PM
Arthur P
Arthur P - avatar