Longest word built one letter at a time
Given a list words, return the longest word of the list that can be built one letter at a time, with every step also in the list: its first letter alone is in words, and so are its first two letters, its first three, and so on up to the whole word. So a one-letter word always qualifies. If several are equally long, return the alphabetically smallest; if none qualifies, return "".
Words use lowercase a–z and have at least one letter; words may be empty or contain repeats.
Examples
longest_buildable(["a","ap","app","appl","apple","apply","b"])→"apple"longest_buildable(["dot","do","d","dog","cat"])→"dog"longest_buildable(["ab","abc","bcd"])→""