Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 33 characters in body
Source Link
Pavel
  • 9.5k
  • 1
  • 56
  • 96

Java (OpenJDK), 82 bytes

-2 bytes thanks to @corvus_192!

s->s[0].split(" ").length==5&&s[2]length==5&s[2].split(" ").length==5&&s[1]length==5&s[1].split(" ").length==7

Try it online!

It looks so golfable but without a builtin map function, I can't find a good way. Iterating through the array is a few bytes longer, as is writing a map function using streams.

Lambda expression takes an array of Strings and returns a Boolean.

Java (OpenJDK), 82 bytes

s->s[0].split(" ").length==5&&s[2].split(" ").length==5&&s[1].split(" ").length==7

Try it online!

It looks so golfable but without a builtin map function, I can't find a good way. Iterating through the array is a few bytes longer, as is writing a map function using streams.

Lambda expression takes an array of Strings and returns a Boolean.

Java (OpenJDK), 82 bytes

-2 bytes thanks to @corvus_192!

s->s[0].split(" ").length==5&s[2].split(" ").length==5&s[1].split(" ").length==7

Try it online!

It looks so golfable but without a builtin map function, I can't find a good way. Iterating through the array is a few bytes longer, as is writing a map function using streams.

Lambda expression takes an array of Strings and returns a Boolean.

deleted 4 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Java (OpenJDK), 82 bytes

s->s[0].split(" ").length==5&&s[2].split(" ").length==5&&s[1].split(" ").length==7

Try it online! Try it online!

It looks so golfable but without a builtin map function, I can't find a good way. Iterating through the array is a few bytes longer, as is writing a map function using streams.

Lambda expression takes an array of Strings and returns a Boolean.

Java (OpenJDK), 82 bytes

s->s[0].split(" ").length==5&&s[2].split(" ").length==5&&s[1].split(" ").length==7

Try it online!

It looks so golfable but without a builtin map function, I can't find a good way. Iterating through the array is a few bytes longer, as is writing a map function using streams.

Lambda expression takes an array of Strings and returns a Boolean.

Java (OpenJDK), 82 bytes

s->s[0].split(" ").length==5&&s[2].split(" ").length==5&&s[1].split(" ").length==7

Try it online!

It looks so golfable but without a builtin map function, I can't find a good way. Iterating through the array is a few bytes longer, as is writing a map function using streams.

Lambda expression takes an array of Strings and returns a Boolean.

Source Link
Pavel
  • 9.5k
  • 1
  • 56
  • 96

Java (OpenJDK), 82 bytes

s->s[0].split(" ").length==5&&s[2].split(" ").length==5&&s[1].split(" ").length==7

Try it online!

It looks so golfable but without a builtin map function, I can't find a good way. Iterating through the array is a few bytes longer, as is writing a map function using streams.

Lambda expression takes an array of Strings and returns a Boolean.

AltStyle によって変換されたページ (->オリジナル) /