Given a list of strings words representing an English Dictionary, find the longest word in words that can be built one character at a time by other words in words. If there is more than one possible answer, return the longest word with the smallest l…
public class Solution { public string LongestWord(string[] words) { var maxlist = new List<string>(); var dic = new Dictionary<string, string>(); Queue<string> Q = new Queue<string>(); var maxstr = ""; foreach (var word i…