abhilash_8642's blog

By abhilash_8642, history, 2 years ago, In English

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

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by abhilash_8642 (previous revision, new revision, compare).

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Problem link?

»
2 years ago, # |
  Vote: I like it -7 Vote: I do not like it

Bro it is somewhat similar to this problem.