News for hackers. Stuff that matters.
Re:Array Languages vs. the Curse of the Spreadsheet by leephillips on Wednesday March 06, 2024 @12:50PM (#39618638)
The problem as stated does not have a unique solution in general, as you’ve found. One Julia program for this is

`sort(split(p)[count.(r"[aeiou]", split(p)) .< 3]; by=r -> length(r))[end]`

which also returns "grasp".

But this one appeals to me more, because it doesn’t split twice:

`sort(filter(w -> count(r"[aeiou]", w) < 3, split(p)); by=r -> length(r))[end]`

There are no comments on this comment yet.