String Matching Problem

Revision en2, by aka.Sohieb, 2016-05-13 03:39:52

I was trying to solve this problem ( Ransom Note ) but failed, i can not find any algorithm to solve this with the given constrains, and i searched for any solution to this problem but not found any.

Could anyone tell me a hint or an appropriate algorithm to solve this!!

thanks in advance :)

UPD

I solved it using a hint from jcg, and this is my code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English aka.Sohieb 2016-05-13 03:39:52 115
en1 English aka.Sohieb 2016-05-12 16:54:42 414 Initial revision (published)