Concatenated Words
Given an array of strings words (without duplicates), return all the concatenated words in the given list. A concatenated word is a string that is comprised entirely of at least two shorter words in the given array.
Concatenated Words

Given an array of strings words (without duplicates), return all the concatenated words in the given list. A concatenated word is a string that is comprised entirely of at least two shorter words in the given array.

Example 1:
Input: {"words":["cat","cats","catsdogcats","dog","dogcatsdog","hippopotamuses","rat","ratcatdogcat"]}
Output: ["catsdogcats","dogcatsdog","ratcatdogcat"]
Input
arr ={"words":["cat","cats","catsdogcats","dog","dogcatsdog","hippopotamuses","rat","ratcatdogcat"]}

Find all concatenated words from 8 words

State
wordCount
8
Variables
No variables to display
DepthFunction Call
Stack empty
0/4