Skip to main content
added 222 characters in body
Source Link
randomra
  • 20.9k
  • 4
  • 46
  • 111

J, 15 chars

   (-:>./"1<./>./)

Didn't expect this short solution.

Short explanation:

(input == ((max of rows of input) table with min of left and right (max in columns of input)))
(      -:          >./"1                        <./                       >./              )

If your function is 4 other function like in the solution: (f1 f2 f3 f4) and an input J computes it like f1(input,f3(f2(input),f4(input))) i.e. input f1 ((f2 input) f3 (f4 input)).

J, 15 chars

   (-:>./"1<./>./)

Didn't expect this short solution.

Short explanation:

(input == ((max of rows of input) table with min of left and right (max in columns of input)))
(      -:          >./"1                        <./                       >./              )

J, 15 chars

   (-:>./"1<./>./)

Didn't expect this short solution.

Short explanation:

(input == ((max of rows of input) table with min of left and right (max in columns of input)))
(      -:          >./"1                        <./                       >./              )

If your function is 4 other function like in the solution: (f1 f2 f3 f4) and an input J computes it like f1(input,f3(f2(input),f4(input))) i.e. input f1 ((f2 input) f3 (f4 input)).

added 222 characters in body
Source Link
randomra
  • 20.9k
  • 4
  • 46
  • 111

J, 15 chars

   (-:>./"1<./>./)

Didn't expect this short solution.

Short explanation:

(input == ((max of rows of input) table with min of left and right (max in columns of input)))
(      -:          >./"1                        <./                       >./              )

J, 15 chars

   (-:>./"1<./>./)

Didn't expect this short solution.

J, 15 chars

   (-:>./"1<./>./)

Didn't expect this short solution.

Short explanation:

(input == ((max of rows of input) table with min of left and right (max in columns of input)))
(      -:          >./"1                        <./                       >./              )
Source Link
randomra
  • 20.9k
  • 4
  • 46
  • 111

J, 15 chars

   (-:>./"1<./>./)

Didn't expect this short solution.