Double thanks.
One for that sparse array trick. That will go into my toolbox.
And secondly, for the work you've been putting into the youtube videos -- I
think they've been an invaluable teaching aid, and a welcome addition to
the relative paucity of J learning outside of the main website.
On
Also, I am not sure that I would call it an anti-pattern but you can simplify
your general example by using Compose (&)
( pentagonal 20+i.6) +/ pentagonal >: i. 5
1182 1190 1204 1224 1250
1304 1312 1326 1346 1372
1432 1440 1454 1474 1500
1566 1574 1588 1608 1634
1706 1714 1728 1748 1774
1852
Wow Daniel,
I am sincerely impressed at how you wrestled that one to the ground.
A trick I learned a while ago on these forums was the use of Sparse ($.)
toy e. _1
1 0 0 0
0 0 1 1
0 0 0 0
$. toy e. _1 NB. converts dense array to sparse form
0 0 │ 1
1 2 │ 1
1 3 │ 1
4 $. $. toy e. _1 NB.
Hi everyone,
I’m looking for some newbie help. I feel I’ve come so far but I’ve run
into something that is making me think I’m not really getting something
fundamental.
Rather than try to come up with a contrived example, I’ll just say outright
that I’m trying to solve one of the project Euler q