Fewest letter changes between two words
You can turn one word into another by changing a single letter at a time, and every word you produce along the way, including the last, must be in the list words. Return the fewest changes needed to turn start into target, or -1 if it can't be done.
All words are lowercase and have the same length, and start differs from target. start doesn't need to be in words, which may contain repeats.
Besides the tests, one large input (16 four-letter words) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
fewest_changes("cold", "warm", ["cord","card","ward","warm","word"])→4fewest_changes("cat", "dog", ["cot","cog","dot","dog"])→3fewest_changes("lead", "gold", ["load","goad"])→-1