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″]

KodNest Training New Batch is starting on 02nd November 2020. Attend one week free demo classes.Register Now

New Report

Close