Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 625 Bytes

File metadata and controls

11 lines (8 loc) · 625 Bytes

Fractal Hackerrank Challenge

Longest Even Length Word

Consider a string, sentence, of space-separated words where each word is a substring consisting of English alphabetic letters only.

We want to find the first word in sentence having a length which is both an even number and greater than or equal to the length of any other word of even length in the sentence. For example, if sentence is Time to write great code , then the word we're looking for is Time . While code and Time are of maximal length, Time occurs first. If sentence is Write code for a great time , then the word we're looking for is code.