Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a method to find the longest word in a sentence.

Medium

Problem Statement

Create a method to find the longest word in a sentence.

Sample Input

"The quick brown fox jumps over the lazy dog"

Sample Output

quick

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
# Predefined sentence sentence = "The quick brown fox jumps over the lazy dog" # Your logic here
Log in or sign up to run or submit your code.Log inSign up
Input
"The quick brown fox jumps over the lazy dog"
Expected Output
quick