Given an array of string and interleaved word, write a function to output the words in array used to make a interleaved word

Its urgent,please help me.

Example-
StringArray : {“cat”, “bat”, “father”, “mother”}

InterleavedWord : “fcaatther”

output : “father”

“cat”

One thing you can do is to store the count of each letter of each word and on the input of an interleaved word , can check for the combination of those words , each letter count to the letter count of the input .

i also did the same,any optimized way?

Sorry bro , I have to pass on this one .