comp.lang.ada
 help / color / mirror / Atom feed
From: Maxim Reznik <reznikmm@gmail.com>
Subject: Re: Advent of Code Day 6
Date: Mon, 7 Dec 2020 02:55:06 -0800 (PST)	[thread overview]
Message-ID: <10a26bc3-9f76-4857-be6d-ec00fccbdbc9n@googlegroups.com> (raw)
In-Reply-To: <5b8e43c3-ed39-4a44-8aa6-bc00d43be624n@googlegroups.com>

In my solution I use a custom type - a boolean flag for each character. It takes 26 bytes (or even bits if you add `with Pack` aspect) and should be quite fast. Having this type it's easy to do `and` and `or` between such maps:

https://github.com/reznikmm/ada-howto/blob/advent-2020/md/06/06.md

--
Max

  reply	other threads:[~2020-12-07 10:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06  8:39 Advent of Code Day 6 John Perry
2020-12-06 11:07 ` Jeffrey R. Carter
2020-12-06 19:37   ` John Perry
2020-12-07 10:55     ` Maxim Reznik [this message]
2020-12-07 13:32       ` Jeffrey R. Carter
replies disabled

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