Japt -hg, 89 bytes
Input as a multi-line string
·ñÊÔñ!èU
·ñÊÔñ!è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ÌñÊ
ü üÊÌ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
·ñÊÔñ!è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ÌñÊ
ü üÊÌ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
·ñÊÔñ!è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ÌñÊ
ü üÊÌ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
Japt -g, 9 bytes
Input as an array of lines.
ü üÊÌcÌñÊ
ü üÊÌ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
·ñÊÔñ!è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ÌñÊ
ü üÊÌ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 -gh, 98 bytes
Input as a multi-line string
·ñÊÔñ!èU
Japt -g , 9 bytes
Input as an array of lines.
ü üÊÌcÌñÊ
ü üÊÌ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
Japt -g , 9 bytes
Input as an array of lines.
ü üÊÌcÌñÊ
ü üÊÌ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