Can I chime in with a quick C# and LINQ one liner?
private Longest(string sentance)
return sentance.Split(' ').OrderByDescending(l => l.Length).FirstOrDefault();
Well, the return statement is a one liner :)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.