Skip to content

Latest commit

 

History

History
50 lines (27 loc) · 1 KB

README_EN.md

File metadata and controls

50 lines (27 loc) · 1 KB

中文文档

Description

Given a list of words, write a program to find the longest word made of other words in the list. If there are more than one answer, return the one that has smallest lexicographic order. If no answer, return an empty string.

Example:

Input:  ["cat","banana","dog","nana","walk","walker","dogwalker"]

Output:  "dogwalker"

Explanation:  "dogwalker" can be made of "dog" and "walker".

Note:

  • 0 <= len(words) <= 100
  • 1 <= len(words[i]) <= 100

Solutions

Python3

Java

...