← Cognizant questions
CodingReported in a candidate post, Nov 2025

Find length of longest word and print matching words

Filed under Cognizant

Given a string containing words, spaces, and full stops, find the length of the longest word and print all words that have that length.

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 Cognizant questions

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