It is often best to try to arrive at a solution with small amount of data
and not think about the size of the real data.
Very often you can use the solution as is or adjust it to go for blocks at a
time.
You can even solve things sometimes using ordinary programming techniques on
one item at a time.
It is just good to play with the data and eventually arrive at an acceptable
solution.

2011/10/20 David Vaughan <[email protected]>

> I find it interesting how different my approach has to be if I want a J
> solution compared to a C or Java solution. I often try to impose my
> imperative version onto J and start getting stuck trying to express it, such
> as in this case. I often find that I can't really use J for the solution
> because of the size of the array I'd have to create / or in general the
> memory required - I'm sure there's some other way round it.
>
> On 20 Oct 2011, at 13:21, Mike Day wrote:
>
> > Yes, I'm sure it is Euler 121.   I don't think the actual answer has been
> > posted in this thread,  so that's ok.
> >
> > FWIW,  my solution (a few years old, now) appears not to have used
> > the comb verb.   On this machine, it runs in ~0.05 sec using  ~1MB of
> > space.
> >
> > I wish all my Euler solutions were as nifty.
> >
> > Mike
> >
> > On 20/10/2011 8:07 AM, Nick Simicich wrote:
> >> Is this euler 121?
> >>
> >> On Wed, Oct 19, 2011 at 6:24 PM, David Vaughan<
> [email protected]
> >>> wrote:
> >>> Thanks, this was the method I had envisaged. I wasn't thinking about it
> in
> >>> the J way originally - this is something I'm trying to work on.
> >>>
> >>>
> > ..........[ I've snipped the rest - Mike]
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði,
t-póst: [email protected]
gsm: +3546985532
twitter: @flugfiskur
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
          /|_      .-----------------------------------.
         ,'  .\  /  | Með léttri lund verður        |
     ,--'    _,'   | Dagurinn í dag                     |
    /       /       | Enn betri en gærdagurinn  |
   (   -.  |        `-----------------------------------'
   |     ) |         (\_ _/)
  (`-.  '--.)       (='.'=)   ♖♘♗♕♔♙
   `. )----'        (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to