From the course: Nail Your Java Interview

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Challenge: Find most repeated word

Challenge: Find most repeated word - Java Tutorial

From the course: Nail Your Java Interview

Start my 1-month free trial

Challenge: Find most repeated word

(bright music) - [Narrator] Throughout this chapter, we explored the advantages and disadvantages of each data structure and how to use them in Java. For this challenge, you'll need to decide which data structure is best to use to manipulate and organize your data for implementing your solution in code. Here's your challenge. Determine the most repeated word in a given string. A word is defined as something separated by spaces or punctuation. No words should include spaces or punctuation. For example, if you have something like, "she enjoys bananas, apples, and oranges", the words would be, "she, enjoys, apples, bananas, and, oranges", without the punctuation or spaces included. Here's a list of delimiters that might help you. Characters in the string will only include punctuation and letters but the letters can be upper or lower case. The uppercase and lowercase version of a word should be counted as the same. For…

Contents