Longest Word In Dictionary
1. Given an array of strings words. 2. Find the word of longest length, where all of its substrings starting from 0th index exists as different word in array. 3. If there are multiple answers with same length return one which is smallest in lexicographical order. If there is no valid string return empty string.
1. 1 <= words.length <= 1000 2. 1 <= words[i].length <= 30 3. words[i] consists of lowercase English letters.
Input is managed for you
Output is managed for you
7 a banana app appl ap apply apple