How to Find The Longest Word In A String (Basic to Advance)?

Deepa Jarout
Jan 19, 2022

--

In this blog, We will discuss the basic approach to the advanced approach to counting the letters in individual words. Then, compare the counts to determine which word has the most characters and return the length of the longest word.

Objective

Return the length of the longest word in the provided sentence.

Your response should be a number.

Basic Solution

Basic Solution

Intermediate Solution

Intermediate Solution

Advanced Solution

Advanced Solution

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Deepa Jarout
Deepa Jarout

Written by Deepa Jarout

I am Software developer.I like problem solving, traveling, photography, dancing, video games, conversation.I like to explore new places with different tradition

Responses (1)

Write a response