comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Advent of Code Day 8
Date: Thu, 10 Dec 2020 11:24:09 -0800	[thread overview]
Message-ID: <86h7otcvmu.fsf@stephe-leake.org> (raw)
In-Reply-To: 9f68c8b6-0018-4722-9572-ea6041fb2bccn@googlegroups.com

John Perry <john.perry@usm.edu> writes:

> On Thursday, December 10, 2020 at 3:07:22 AM UTC-6, Maxim Reznik wrote:
>> Do you consider my solution for Day 9 as brute force one? ;) 
>> 
>> https://github.com/reznikmm/ada-howto/blob/advent-2020/md/09/09.md
>
> I really like this approach, but it seems equivalent. 

+ 1.

You process each number in the input file only once, which is very nice.
It avoids keeping all the numbers in memory at once, so could work for
_very_ large files (although then you'd need integers much larger than
64 bits as well).


-- 
-- Stephe

  reply	other threads:[~2020-12-10 19:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 20:04 Advent of Code Day 8 Stephen Leake
2020-12-09 22:44 ` John Perry
2020-12-10  8:25   ` John Perry
2020-12-10  9:07     ` Maxim Reznik
2020-12-10 16:50       ` John Perry
2020-12-10 19:24         ` Stephen Leake [this message]
2020-12-10 12:25     ` gautier...@hotmail.com
2020-12-10 19:24   ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox