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 95 characters in body
Source Link
nwellnhof
  • 10.6k
  • 1
  • 20
  • 38

Perl 6, 41 bytes

{.max,.min}o+<<*.permutations.map(*.join)

Try it online!

AlternativeAlternatives:

{.max,.min}o+<<*.permutations.map:{.join}
{.max,.min}o{[map +*.join,.permutations]}
{.max,.min}o{+<<map *.join,.permutations}

Perl 6, 41 bytes

{.max,.min}o+<<*.permutations.map(*.join)

Try it online!

Alternative:

{.max,.min}o{[map +*.join,.permutations]}

Perl 6, 41 bytes

{.max,.min}o+<<*.permutations.map(*.join)

Try it online!

Alternatives:

{.max,.min}o+<<*.permutations.map:{.join}
{.max,.min}o{[map +*.join,.permutations]}
{.max,.min}o{+<<map *.join,.permutations}
Source Link
nwellnhof
  • 10.6k
  • 1
  • 20
  • 38

Perl 6, 41 bytes

{.max,.min}o+<<*.permutations.map(*.join)

Try it online!

Alternative:

{.max,.min}o{[map +*.join,.permutations]}

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