Word Matcher

Revision en3, by abhilash_8642, 2022-11-03 06:46:25

You are given a string str and array of string vec. You have to tell whether you can acheive str by combination of strings in vec. You need to use each string of vec atmost once. vec may contain the repeating strings.

constraints: 1<=str.length<=300 1<= vec.length <= 1000 1 <= vec[i].length <=20

Sample Input :

codeit
2
code
it

Sample Output:

yes

Please give me the idea to solve.... Thank you in advance

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English abhilash_8642 2022-11-03 06:46:25 78 Tiny change: ':\ncodeit // str\n2 // vec.length\ncode \' -> ':\ncodeit \n2 \n\ncode \'
en2 English abhilash_8642 2022-11-03 06:42:52 5 Tiny change: '20\n\n\n\nSome Please giv' -> '20\n\n\n\nPlease giv' (published)
en1 English abhilash_8642 2022-11-03 06:42:19 386 Initial revision (saved to drafts)