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 - Java Tutorial
From the course: Nail Your Java Interview
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Leveraging stacks as a data structure4m 36s
-
Using queues in technical interviews4m 5s
-
Mastering hash-based structures4m 51s
-
Challenge: Generate binary numbers1m 19s
-
Solution: Generate binary numbers6m 35s
-
Challenge: Matching parentheses1m 5s
-
Solution: Matching parentheses3m 51s
-
Challenge: Find most repeated word2m 16s
-
Solution: Find most repeated word3m 28s
-
-
-