Google String Question: Annoying its not on LC
Anonymous User
401

Friend got asked this question.
You're given a string Source like 'apples' and string Target like 'please'. You need to return number of Source strings required to make Target string for all the letters.

Example: source: apples target = please
expected output = 2
Source has [a1, p2, l1, e1, s1] Target needs [p1, l1, e2, a1, s1]
Due to extra 'e'required, we need atleast 2 source.

Is this in LC? I could not find it.

Comments (3)