Skip to main content
deleted 6 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Jelly, 8 bytes

ṣ”|f@ẆQƑ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!Try it online!

How?

ṣ”|f@ẆQƑ - Link: list of characters, T ṣ”| - split {T} at '|' characters -> Parts Ẇ - non-empty sublists of {T} -> Substrings @ - with swapped arguments: f - filter-keep -> all of the Substrings that are Parts Ƒ - is invariant under?: Q - deduplicate 

Jelly, 8 bytes

ṣ”|f@ẆQƑ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!

How?

ṣ”|f@ẆQƑ - Link: list of characters, T ṣ”| - split {T} at '|' characters -> Parts Ẇ - non-empty sublists of {T} -> Substrings @ - with swapped arguments: f - filter-keep -> all of the Substrings that are Parts Ƒ - is invariant under?: Q - deduplicate 

Jelly, 8 bytes

ṣ”|f@ẆQƑ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!

How?

ṣ”|f@ẆQƑ - Link: list of characters, T ṣ”| - split {T} at '|' characters -> Parts Ẇ - non-empty sublists of {T} -> Substrings @ - with swapped arguments: f - filter-keep -> all of the Substrings that are Parts Ƒ - is invariant under?: Q - deduplicate 
deleted 78 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, 98 bytes

ṣ”|ẇþ`§²Ƒṣ”|f@ẆQƑ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!

How?

ṣ”|ẇþ`§²Ƒṣ”|f@ẆQƑ - Link: list of characters, T ṣ”|  - split {T} at '|' characters `  - use that as both arguments> of:Parts   þ  - non-empty sublists makeof a{T} table-> of:Substrings  @ -  sublistwith existsswapped in?arguments:   f (N.B. when- T=[] (AKA "") wefilter-keep get-> [[0]],all asof the empty list isn't counted) § Substrings that -are sumsParts   Ƒ - is that invariant under?:   ²Q -  square all valuesdeduplicate 

Jelly, 9 bytes

ṣ”|ẇþ`§²Ƒ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!

How?

ṣ”|ẇþ`§²Ƒ - Link: list of characters, T ṣ”|  - split {T} at '|' characters `  - use that as both arguments of:   þ - make a table of:  -  sublist exists in?   (N.B. when T=[] (AKA "") we get [[0]], as the empty list isn't counted) §  - sums   Ƒ - is that invariant under?:   ² -  square all values 

Jelly, 8 bytes

ṣ”|f@ẆQƑ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!

How?

ṣ”|f@ẆQƑ - Link: list of characters, T ṣ”| - split {T} at '|' characters -> Parts  - non-empty sublists of {T} -> Substrings @ - with swapped arguments: f - filter-keep -> all of the Substrings that are Parts Ƒ - is invariant under?: Q - deduplicate 
edited body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, 9 bytes

ṣ”|ẇþ`§²Ƒ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!

How?

ṣ”|ẇþ`§²Ƒ - Link: list of characters, T ṣ”| - split {T} at '|' characters ` - use that as both arguments of: þ - make a table of: ẇ - sublist exists in? (N.B. when T=[] (AKA "") we get [[0]] at, thisas point,the notempty [[]]list orisn't [[1]]counted) § - sums Ƒ - is that invariant under?: ² - square all values 

Jelly, 9 bytes

ṣ”|ẇþ`§²Ƒ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!

How?

ṣ”|ẇþ`§²Ƒ - Link: list of characters, T ṣ”| - split {T} at '|' characters ` - use that as both arguments of: þ - make a table of: ẇ - sublist exists in? (N.B. when T=[] (AKA "") we get [[0]] at this point, not [[]] or [[1]]) § - sums Ƒ - is that invariant under?: ² - square all values 

Jelly, 9 bytes

ṣ”|ẇþ`§²Ƒ 

A monadic Link that accepts a list of characters and yields 0 (falsey) if redundant, or 1 (truthy) otherwise (i.e. inverted).

Try it online!

How?

ṣ”|ẇþ`§²Ƒ - Link: list of characters, T ṣ”| - split {T} at '|' characters ` - use that as both arguments of: þ - make a table of: ẇ - sublist exists in? (N.B. when T=[] (AKA "") we get [[0]], as the empty list isn't counted) § - sums Ƒ - is that invariant under?: ² - square all values 
added 422 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293
Loading
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293
Loading