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

deleted 3107 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt -hg, 89 bytes

Input as a multi-line string

·ñÊÔñ!èU

Try it

·ñÊÔñ!èU :Implicit input of multi-line string U
· :Split on newlines
 ñ :Sort by
 Ê : Length
 Ô :Reverse
 ñ :Sort by
 !èU : Count occurrences in U
 :Implicit output of last element

Japt -g , 9 bytes

Input as an array of lines.

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element

Japt -h, 8 bytes

Input as a multi-line string

·ñÊÔñ!èU

Try it

·ñÊÔñ!èU :Implicit input of multi-line string U
· :Split on newlines
 ñ :Sort by
 Ê : Length
 Ô :Reverse
 ñ :Sort by
 !èU : Count occurrences in U
 :Implicit output of last element

Japt -g , 9 bytes

Input as an array of lines.

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element

Japt -g, 9 bytes

Input as an array of lines.

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element
added 249 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt -h, 8 bytes

Input as a multi-line string

·ñÊÔñ!èU

Try it

·ñÊÔñ!èU :Implicit input of multi-line string U
· :Split on newlines
 ñ :Sort by
 Ê : Length
 Ô :Reverse
 ñ :Sort by
 !èU : Count occurrences in U
 :Implicit output of last element

Japt -g, 9 bytes

Input as an array of lines.

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element

Japt -h, 8 bytes

Input as a multi-line string

·ñÊÔñ!èU

Try it

Japt -g, 9 bytes

Input as an array of lines.

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element

Japt -h, 8 bytes

Input as a multi-line string

·ñÊÔñ!èU

Try it

·ñÊÔñ!èU :Implicit input of multi-line string U
· :Split on newlines
 ñ :Sort by
 Ê : Length
 Ô :Reverse
 ñ :Sort by
 !èU : Count occurrences in U
 :Implicit output of last element

Japt -g, 9 bytes

Input as an array of lines.

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element
added 2838 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt -gh, 98 bytes

Input as a multi-line string

·ñÊÔñ!èU

Try it

Japt -g , 9 bytes

Input as an array of lines.

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element

Japt -g, 9 bytes

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element

Japt -h, 8 bytes

Input as a multi-line string

·ñÊÔñ!èU

Try it

Japt -g , 9 bytes

Input as an array of lines.

ü üÊÌcÌñÊ

Try it

ü üÊÌcÌñÊ :Implicit input of array
ü :Group & sort by value
 ü :Group & sort by
 Ê : Length
 Ì :Last element
 c :Flat map
 Ì : Last element
 ñ :Sort by
 Ê : Length
 :Implicit output of first element
added 360 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95
Loading
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95
Loading

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