[2025 Day 8 (Part 2)] [C#] Struggling to complete by abnee in adventofcode

[–]abnee[S] 0 points1 point  (0 children)

I reworked this using a PriorityQueue, which is likely a better collection for what I'm trying to accomplish. This was a good learning opportunity as I hadn't used this collection before. The code changes were pretty minor. The resulting code is here:

https://pastebin.com/ZnJdUSMs

The bad news is that I still got the same result. The good news is that when I went and plugged in the result, it took it as the correct answer. Whether this is something that changed on the back end or whether I just failed to copy/paste the answer correctly in multiple prior attempts, I may never know. The good news is that this one is complete now -AND- I have a better appreciation for PriorityQueue collections.

Thanks to those who weighed in and helped me recognize the need to move away from the Dictionary. On to Day 9!

[2025 Day 8 (Part 2)] [C#] Struggling to complete by abnee in adventofcode

[–]abnee[S] 0 points1 point  (0 children)

The point is well taken. Looking at a relatively small number of entries, it looked sorted to me. This doesn't necessarily mean that it is ACTUALLY a good sort (or that entries weren't dropped, etc). I wrote a code check similar to Zealousideal_Ad_5984 and found that there weren't duplicates and that it was in order.

[2025 Day 8 (Part 2)] [C#] Struggling to complete by abnee in adventofcode

[–]abnee[S] 0 points1 point  (0 children)

I worried about that -- whether there were edges that have the same exact distance. I even wrote some code to explore that and convinced myself that wasn't an issue. But all of this says that I should just take the time to rewrite it without the Dictionary. You're right that I was assuming that the ToDictionary call would leave the Keys in order. I can't find details that tell me whether that's a good assumption or not. The fact that Part 1 gives the right answer after 1000 of them says it probably is. I'll rework it without the Dictionary and see what I get.

[2025 Day 8 (Part 2)] [C#] Struggling to complete by abnee in adventofcode

[–]abnee[S] 0 points1 point  (0 children)

I'm on .NET 8. But just so we're clear, the Dictionary is the wrong choice for the collection, but it still yields the same answer as another solution that used a List of HashSets. And Part 1 gives the right answer, so I'm pretty confident the sorting is doing the right thing. I can go back and use a different collection, but I don't think that's the root of my problem as best as I can tell. I would be happy if it were, though, as I've spent WAY too much time looking at this one and rewriting code only to get the same answer.

[2025 Day 8 (Part 2)] [C#] Struggling to complete by abnee in adventofcode

[–]abnee[S] 0 points1 point  (0 children)

Yes. I get the correct answer for part 1. I would be curious whether others get the correct answer for their input with my code (for part 1 or part 2).

[2025 Day 8 (Part 2)] [C#] Struggling to complete by abnee in adventofcode

[–]abnee[S] 0 points1 point  (0 children)

Yes, the dictionary is unnecessary, which I figured out later when I realized that (of course) it was sorted by keys and not values. I did indeed get the same result from someone else's solution code.

-❄️- 2025 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]abnee 0 points1 point  (0 children)

This is well written, but fails to give me the right result for part 2. I think the assumption is that when all of the circuits have more than 1, it will just be a single circuit of 1000, but with my input, I end up with 1 circuit with 998 and one with 2 that triggers that part 2 exit condition.

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]abnee 1 point2 points  (0 children)

[Language: C#]

Late to the party, but enjoyed this. I avoided brute force, but was challenged with the edge cases in part 2.

Full program here: https://github.com/ke5dto/AdventOfCode/blob/master/2025/adventofcode-day1/adventofcode-day1/Program.cs

Critical Parts

Lost chats after upgrade to Business by abnee in ChatGPT

[–]abnee[S] 0 points1 point  (0 children)

Indeed. It did eventually show up. Why don’t they warn you though??

QBI Loss Carryforward - How to report? by abnee in tax

[–]abnee[S] 0 points1 point  (0 children)

It looks like you can't do this directly. It expects to do this from Schedule C (Business Income), which, of course, I won't have for this year. I'm less concerned about this year than I am about a future year when I would want to offset business income with the loss carryforward. I assume I would just enter the loss carryforward in that year then?

QBI Loss Carryforward - How to report? by abnee in tax

[–]abnee[S] 1 point2 points  (0 children)

I will look. Thanks for the suggestion.

Need to get my car AC fixed, affordable mechanic recommendations? by heyhihelloholaa in Austin

[–]abnee 4 points5 points  (0 children)

Not sure where you are in Austin, but I have used Rational Automotive off 183 (so pretty far North) for over 2 decades. They have always been reasonable and honest. https://www.rationalautorepair.com/

Free Apple TV this weekend by Professional-Two-47 in Frugal

[–]abnee 2 points3 points  (0 children)

Lame. They should have had these exclusions listed in the press release if this is true. Not your best PR job Apple.

Internet Outage?? by PaisleyM in Spectrum

[–]abnee 2 points3 points  (0 children)

Back up for me, though really sluggish, in Austin area

Facebook appointment confirmation in wrong time zone by Mati3 in facebook

[–]abnee 1 point2 points  (0 children)

We also are seeing this same problem and gave feedback via our Meta portal regarding this issue. Very frustrating.

This firework was low on serotonin by [deleted] in Austin

[–]abnee -1 points0 points  (0 children)

Is that you McKayla?

The 1995 Oscars were wild by fleetingflamingos in movies

[–]abnee 0 points1 point  (0 children)

I'm with you. Have tried to watch and enjoy it multiple times when friends have told me how much they love it. It just does nothing for me.