Longest Valid Word with All Prefixes
Jan 15 · 2 min read · Problem Given an array of strings words[], find the longest string such that every prefix of it is also present in words[]. If multiple strings have the same maximum length, return the lexicographically smallest one. (link) If no such string is found...
Join discussion