Question 6

Can you break the given string into words, provided by a given hashmap of frequency of word as

Example:

HashMap -> {“abc”:3, “ab”:2, “abca”:1}

String: abcabcabcabca

output: Yes; [ abc, abc, abc , abca ]

Example:

HashMap -> {“abc”:3, “ab”:2}

String: abcabab

output: No

Example:

HashMap -> {“abc”:3, “ab”:2, “abca”:1}

String: abcx

output: No

[advanced_iframe securitykey=”undefined” src=”https://code.kodnest.com/” width=”100%” height=”600″]

×