Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVUeY-004R1z-1r for pgsql-general@arkaria.postgresql.org; Tue, 16 Dec 2025 12:59:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVUeW-006Znz-1i for pgsql-general@arkaria.postgresql.org; Tue, 16 Dec 2025 12:59:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVUeW-006Znq-0S for pgsql-general@lists.postgresql.org; Tue, 16 Dec 2025 12:59:44 +0000 Received: from mail-yx1-xb12c.google.com ([2607:f8b0:4864:20::b12c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vVUeU-00132s-1D for pgsql-general@lists.postgresql.org; Tue, 16 Dec 2025 12:59:44 +0000 Received: by mail-yx1-xb12c.google.com with SMTP id 956f58d0204a3-6447743ce90so4441854d50.2 for ; Tue, 16 Dec 2025 04:59:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765889979; x=1766494779; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7noxvm7ynV/Of4amnSo9IivO1zvUlRPI15MgJF/qJ9c=; b=FjFOsAuwvzCkJQ1lTbAzeWvT2lRUBsHq14mDZyHj0ZbjlVqLmCsl1qPa/2QunNNoPZ oPchPLakntOUfPuYZ2feopP4cngUfpmzW3L5ftGhPkv+mPboikdrDuBW8CPBo8l1bwaq 2vP1hWZmw/FkzkU15VpjnfvqCDieHv66po6ZzcZTcnUNYf6stnXRNAmPK40cAh4mQzlU 5ZMDL1Sye7y8dgAfdaEQ/M7VzfFvM0MRNT6ZUrUQfw/Vl7DXhbihE1WOXJod1q4D8wdP 9BhYlwjuqS4uwTdPrOx4+vf7Cg1pvmcxUCD8te5iSwoXPR87wnPJn4NbjXDE6ezBDF5+ qXig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765889979; x=1766494779; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7noxvm7ynV/Of4amnSo9IivO1zvUlRPI15MgJF/qJ9c=; b=FEnlQ6sQVspr/zf3jbyC2x7A14yS2sZCq1gR2WpmyIGcSV5N//yH1gPbvNbFPaskRY ExTCqDCFW4wT2wHY/S7h8i7mMbKY2sp/QCIDN0GatTPB+YdQFoqCWqNadYSf+qzcIBPh E2x2miGXn1pA82kemsMqdqlxk4UqAygMo01glyUE9RC+2moiV7oh48Jnm4xQm+EbqdgE 2dT7YG/p3lealjqpHuwxyPXzXn9FbP5qr12ln1fDpDlml3aPvxKttX6WgAYVOzHhQItK Ntu+TV5suk2hEBvBm9lGzWwxJkPtm8FhOcG2F1hu10saxaD8jTiewsDiYIhdJvPndnmN CssA== X-Gm-Message-State: AOJu0YyHB+UluvHc14aO20fJxfFbTN5fypyWgzj9MbQfs95oy+Yknsta PX9J4zpgC0fOF6L1m2Qhm2flJcaMKgeUsTxwCJf9UG9CFWBAZoiZwhFoDdejkasTiYsNvVlRi/d YAMCFI/B1CyBBBhGwcF9wpn6tOOdRgVY= X-Gm-Gg: AY/fxX4U5MVAnXxWJl4hixmruKKqSxti5a9DEgV5wwHLzyG5zACV7e29jaPGMYxtj7G cZV846Haiidma9vI0co8YtMhOOArGcvESwfSUT+eXTPpmt7wFKJYw2tvq9YHMAn4wai/M5p4Dnj 0Sye68rU6BY5XfxbTTDvBkPdzrLOPvHbFC3aXJT7knfms/PLmHfhCaQ6H8VidVusbQx2cuQsVmn 5Gt9sjb8cLtnMVBpu85BKqpxgwZ2kUSh1/qxbNB/V9Wgpm6gXW7WqtdsB4MSAMJ8mW2sTNlW+ES Z3Iplu1FtGTr//bf4Ayj X-Google-Smtp-Source: AGHT+IE34K3WNgU8QZleG2zTIJLqvOctxjKWOcsagE4SjHRBVhvw4ZJ1gYy0WqOnCAa9ScuUOSU7gwTbwCHwPJq2W60= X-Received: by 2002:a05:690e:11ca:b0:645:527b:bc08 with SMTP id 956f58d0204a3-645555d241amr10378226d50.11.1765889979175; Tue, 16 Dec 2025 04:59:39 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bernice Southey Date: Tue, 16 Dec 2025 12:59:02 +0000 X-Gm-Features: AQt7F2rrWzD-TyRcnS5U7vxWJufgGSgX13LSBXKv011qjosGh6q4LKX4ejGO6Aw Message-ID: Subject: Re: Advent of Code Day 8 To: Greg Sabino Mullane Cc: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Greg Sabino Mullane wrote: > What's so wrong with brute force? :) Yeah, a few more days of AoC changed my mind. > In case it helps, here is my solution: Thank you, this is very clever! I tried something similar, but with updating the circuit in my table on every loop. It ran a couple of minutes just to target the earliest possible full circuit for part 2. This turned out to be the answer, but hardly satisfying. Your array variables trick would never have occurred to me. I found a couple of other interesting ideas on reddit. One used a recursive function in a recursive cte, and another used hstore to track unique boxes. Good luck with day 10 part 2. That's the only one I gave up on after discovering everyone was using solvers, or rolling their own. It's by far the hardest, but one person found a brilliant way...don't forget about part 1. Thanks, Bernice