The function with two parameters: an array of well-known words and word on who will conduct the search | Sololearn: Learn to code for FREE!

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"

8/6/2018 11:41:33 AM

Arthur P

3 Answers

New Answer

0

Ex function Dictionary(['bulb', 'light', 'bulblight', 'lightbulb']); exit: lightbulb

0

What is your question?

0

create such a function that inputs "function Dictionary(['stars', 'mars', 'wars', 'codec', 'codewars'], 'coddwars');" and returns "codewars"