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

time to obsolete the comments >:D
Source Link
Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125

Jelly, 6 bytes

Œ!VṢ.ị

Try it online!

Explanation:

Œ!VṢ.ị Arguments: x
Œ! Permutations of x
 V Concatenate the representations of each permutation's elements and evaluate the result as Jelly code
 Ṣ Sort
 .ị Get element at index 0.5, i.e. elements at indices 0 (last) and 1 (first)

Jelly, 6 bytes

Œ!VṢ.ị

Try it online!

Jelly, 6 bytes

Œ!VṢ.ị

Try it online!

Explanation:

Œ!VṢ.ị Arguments: x
Œ! Permutations of x
 V Concatenate the representations of each permutation's elements and evaluate the result as Jelly code
 Ṣ Sort
 .ị Get element at index 0.5, i.e. elements at indices 0 (last) and 1 (first)
Source Link
Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125

Jelly, 6 bytes

Œ!VṢ.ị

Try it online!

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