Skip to main content
added 9 characters in body
Source Link
Dorian
  • 3k
  • 14
  • 12

05AB1E, 7 6 bytes

∞-γ€gZ

Try it online!

Thanks to @Kevin Cruijssen for -1 byte

Code:

∞       push endless list [1, 2, 3, 4, 5, ...]
-       subtract that from input
γ       group by equal elements
€g      push lengths of each group
Z       push max length
        implicitly print top of stack

05AB1E, 6 bytes

∞-γ€gZ

Try it online!

Thanks to @Kevin Cruijssen for -1 byte

Code:

∞       push endless list [1, 2, 3, 4, 5, ...]
-       subtract that from input
γ       group by equal elements
€g      push lengths of each group
Z       push max length
        implicitly print top of stack

05AB1E, 7 6 bytes

∞-γ€gZ

Try it online!

Thanks to @Kevin Cruijssen for -1 byte

Code:

∞       push endless list [1, 2, 3, 4, 5, ...]
-       subtract that from input
γ       group by equal elements
€g      push lengths of each group
Z       push max length
        implicitly print top of stack
shorter code
Source Link
Dorian
  • 3k
  • 14
  • 12

05AB1E, 76 bytes

TL-γ€gMγ€gZ

Try it online!Try it online!

Thanks to @Kevin Cruijssen for -1 byte

Code:

TL      push endless list [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]...]
-       subtract that from input
γ       group by equal elements
€g      push lengths of each group
MZ       push max length
        implicitly print top of stack

05AB1E, 7 bytes

TL-γ€gM

Try it online!

Code:

TL      push [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
-       subtract that from input
γ       group by equal elements
€g      push lengths of each group
M       push max length
        implicitly print top of stack

05AB1E, 6 bytes

-γ€gZ

Try it online!

Thanks to @Kevin Cruijssen for -1 byte

Code:

      push endless list [1, 2, 3, 4, 5, ...]
-       subtract that from input
γ       group by equal elements
€g      push lengths of each group
Z       push max length
        implicitly print top of stack
Source Link
Dorian
  • 3k
  • 14
  • 12

05AB1E, 7 bytes

TL-γ€gM

Try it online!

Code:

TL      push [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
-       subtract that from input
γ       group by equal elements
€g      push lengths of each group
M       push max length
        implicitly print top of stack