← Barclays questions

Find the longest word in a sentence

Filed under Barclays

Given a sentence as an input string, write a function to parse the sentence into individual words and return the word with the maximum length. If multiple words share the maximum length, return the…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Barclays questions

Collected from public candidate posts and coding forums. Updated Nov 2026.