Skip to main content
edited body
Source Link
H.PWiz
  • 11.7k
  • 2
  • 23
  • 57

Brachylog, 10 bytes

=ᵍbᵐbᵐlᵍ=l 

Try it online!

Explanation

=ᵍ Group all equal elements together bᵐbᵐ Remove the first element of each group twice. This fails if there are fewer than 2 elements lᵍ Group elements together that have the same length = Are all elements of that list equal.? This only succeeds if the list has one element l Length. This will always succeed 

Brachylog, 10 bytes

=ᵍbᵐbᵐlᵍ=l 

Try it online!

Explanation

=ᵍ Group all equal elements together bᵐbᵐ Remove the first element of each group twice. This fails if there are fewer than 2 elements lᵍ Group elements together that have the same length = Are all elements of that list equal. This only succeeds if the list has one element l Length. This will always succeed 

Brachylog, 10 bytes

=ᵍbᵐbᵐlᵍ=l 

Try it online!

Explanation

=ᵍ Group all equal elements together bᵐbᵐ Remove the first element of each group twice. This fails if there are fewer than 2 elements lᵍ Group elements together that have the same length = Are all elements of that list equal? This only succeeds if the list has one element l Length. This will always succeed 
Source Link
H.PWiz
  • 11.7k
  • 2
  • 23
  • 57

Brachylog, 10 bytes

=ᵍbᵐbᵐlᵍ=l 

Try it online!

Explanation

=ᵍ Group all equal elements together bᵐbᵐ Remove the first element of each group twice. This fails if there are fewer than 2 elements lᵍ Group elements together that have the same length = Are all elements of that list equal. This only succeeds if the list has one element l Length. This will always succeed