Question: Purpose: Practice dictionary interview problem Problem Statement: Implement a program that will return the highest frequency word in any given string. The string given can
Purpose: Practice dictionary interview problem
Problem Statement: Implement a program that will return the highest frequency word in any given string. The string given can be song lyrics, and you will return the word the occurs the most amount of times in all lowercase letters.
Note:
Do not try to input the phrase. CodeCheck will do it behind the scene.
Do not print a call to your function. CodeCheck will do it behind the scene.
Criteria:
Input: Just a small town girl Livin' in a lonely world She took the midnight train goin' anywhere Just a city boy Born and raised in South Detroit He took the midnight train goin' anywhere A singer in a smokey room The smell of wine and cheap perfume For a smile they can share the night It goes on and on and on and on
Output: a
Input: "Work, work, work, work, work, work He said me haffi work, work, work, work, work, work He see me do mi dirt, dirt, dirt, dirt, dirt, dirt So me put in work, work, work, work, work, work When you ah gon' learn, learn, learn, learn, learn? Me nuh care if him hurt, hurt, hurt, hurt, hurting"
Output: work
Input: Yo I'll tell you what I want, what I really, really want So tell me what you want, what you really, really want I'll tell you what I want, what I really, really want So tell me what you want, what you really, really want I wanna, ha I wanna, ha I wanna, ha I wanna, ha I wanna really, really, really wanna zigazig ah
Output: really
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
