I was stunned to see how fast, and on pausing, how beautiful Marshall's were. Very unusual and powerful uses of insert.
I doubt you'll find a much faster J solution than:

,(+/~10&*)/ 4#,:>:i.6

or the uglier but slightly quicker

,+// (10<.@^i._4)*/>:i.6
But the problem is structural, not numeric, which attracted me to catalog.

On 10/4/2017 6:28 PM, 'Skip Cave' via Programming wrote:
I was stunned by Cliff's cool use of catalog (catalogue?) I had not really
grasped the capabilities of the monadic use of '{' on boxed arguments. I
had always used { dyadically as 'from'

     2 { 1 2 3

3


This was a revelation:


     {2#<'123'

┌──┬──┬──┐

│11│12│13│

├──┼──┼──┤

│21│22│23│

├──┼──┼──┤

│31│32│33│

└──┴──┴──┘


​Skip​


Skip Cave
Cave Consulting LLC

On Tue, Oct 3, 2017 at 10:21 PM, Cliff Reiter <[email protected]> wrote:

A cheat (?) that builds instead of "removing"

    z=.,".>{4#<'123456'
    $z
1296
    10{.z
1111 1112 1113 1114 1115 1116 1121 1122 1123 1124



On 10/3/2017 4:16 PM, Skip Cave wrote:

Another interesting Quora problem:

Given the integers from 1000 to 9999, remove all integers that contain a
7,
8, 9, or zero, and list the remaining integers.

Skip
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to