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

KodNest Training New Batch is starting on 15th July 2020Check Now

New Report

Close