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