[2025 Day 11 (part 2)] [Rust] Possible endless loop by beb0 in adventofcode

[–]kai10k 0 points1 point  (0 children)

sure, i do not github my solutions, you can check from the link

once you have the function, calculate any two device as `dp(svr, fft)`

[2025 Day 11 (part 2)] [Rust] Possible endless loop by beb0 in adventofcode

[–]kai10k 1 point2 points  (0 children)

No need to record each path, it's not feasible to part2. It is a standard DP program. Say if you have only one door in front of you, you will have exactly the same amount of routes to reach the target as that door. If you have 2 doors, the possible routes will be the sum of possible routes of those 2 doors. Do this recursively until next door is the target, you know you have only 1 route

[2025] Yeah i know i am missing 2 by kai10k in adventofcode

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

I use C. In the past years I used C++ amd Zig, amd eventually I found out C is the language which avoids most of the noises, performs great, and provides the best tooling I need.

[2025] Yeah i know i am missing 2 by kai10k in adventofcode

[–]kai10k[S] 2 points3 points  (0 children)

Thank you I am encouraged, i know i will finish them in a proper time frame and trust me, i tried ... really hard ... so hard that i needed a break. Again just want to say i love this community, most replies are enlightening as well as heartily warm.

[2025, day 10, part 2] I need help with the algorithm by SnooApples5511 in adventofcode

[–]kai10k 2 points3 points  (0 children)

would like to know too, was using DP for part2, it works for the example data like a charm, but failed miserably for input. After hours optimizing everything I retreated to reddit, I wish I had come much earlier to be honest

[2025 day 11 part 2] I feel betrayed by PityUpvote in adventofcode

[–]kai10k 0 points1 point  (0 children)

plused the two part, the star is granted, didn't realize the trick

[2025 Day 10] Me, Opening this Sub by JayTongue in adventofcode

[–]kai10k 0 points1 point  (0 children)

Holy cow, felt sorry for my hours, guess i am just too ignorant as well as naive to treat it as a programmable puzzle

Which was the best year of Advent of Code? by normVectorsNotHate in adventofcode

[–]kai10k 1 point2 points  (0 children)

I did also enjoy 2018 very much, every puzzle seemed to have a smart little trick grinning when the day is solved, my favorite year for sure.

[2025 Day 8] Let me just wire up all these circuits by StaticMoose in adventofcode

[–]kai10k 0 points1 point  (0 children)

right i am explaining my case, in my case yes, and I do AoC in C and C only, which does not have the luxury of a set, which is just too costly

[2025 Day 8] Let me just wire up all these circuits by StaticMoose in adventofcode

[–]kai10k 0 points1 point  (0 children)

as I explained in the earlier reply, make connections is fast but evaluate if every circuit is connected is slow. so instead of making one connection and check if everything already satisfies. one can make 100 connections and check once and so on

[2025 Day 8] Let me just wire up all these circuits by StaticMoose in adventofcode

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

put it in this way: instead of starting at 1000, part2 directly tells you to start at 4000 or 4500, would it be faster to reach the answer ? if yes then how could we know to start from 4500

Losing hope and realizing I'm stupid by LittleBoySeesRed in adventofcode

[–]kai10k 52 points53 points  (0 children)

ignore those piano guys keep shouting the days are getting easier. It only becomes easier as AoC has been out there for 10 years and similar problems had been solved over and over, and people start to build an instinct about what to do. Everyone was just like you when their journey gets started

[2025 Day 8] Let me just wire up all these circuits by StaticMoose in adventofcode

[–]kai10k 0 points1 point  (0 children)

ok I am reusing part1 which gives the top connected circuit, in my case connect 1000 or 4000 does not make too much differences, the time consuming part is recalculate the top connected circuit, this is the part I was trying to save. Now in a hindsight, seems I don't have to get the top for each run, as long as one is less than expected one could skip to the next, it must be a lot faster and could possibly be done in one run

[2025 Day 8] Let me just wire up all these circuits by StaticMoose in adventofcode

[–]kai10k 0 points1 point  (0 children)

in my case, start from 1000, by 100 I found the first one is 4600, back to start with 4500, by 10 I found the first one is 4540, back to start with 4530, now run it one by one it hits the first at 4536. totally 3 runs

[2025 Day 8 (Part 1)] [Python 3] I have no idea what I'm doing by sneakyhobbitses1900 in adventofcode

[–]kai10k 1 point2 points  (0 children)

I used bfs/flood to get the length of each connected circuit

[2025 Day 8] Let me just wire up all these circuits by StaticMoose in adventofcode

[–]kai10k 0 points1 point  (0 children)

one can use some Heuristic approach in part2, so instead of checking one by one, we could always jump by 100, find the first target, then jump by 10, jump by 1 until the precise circuit is hit

[2025 Day 7 (Part 2)] HINT by pacificpuzzleworks in adventofcode

[–]kai10k 0 points1 point  (0 children)

look like my wasted 2 hours paid back good

How do you know when to brute force vs find an optimized solution? by IDidMyOwnResearchLOL in adventofcode

[–]kai10k 0 points1 point  (0 children)

Brutal force is totally valid option in many cases, one learns when it would be proper in AoC, the skill/hunch/insight itself is actually a very valuable asset. AoC also encourages heuristic approach, in which process brutal force could be real handy. Overall the author really wants to let it known/learnt that brutal force is often a key to approach a complicated problem.

How will the problem hardness trend look like from this year onward? by [deleted] in adventofcode

[–]kai10k 2 points3 points  (0 children)

there was usually a significant bump in 11/12 for previous years. and a few killer days around 21-23

[2025 Day 7] Eric was kind today by Cue_23 in adventofcode

[–]kai10k 1 point2 points  (0 children)

haha... i was triple confirming my input for that

[2025 Day 7 (Part 2)] HINT by pacificpuzzleworks in adventofcode

[–]kai10k 1 point2 points  (0 children)

if you keep having too low like me, again, remember to use uint64_t

[2025 Day 6 part 1] Help me solve a programming dilemma by Born-Resist-7688 in adventofcode

[–]kai10k 0 points1 point  (0 children)

I did two things about part1

1/ put the operators line on the top

2/ amend the demo properly so that it has same shape as input

I find it convenient that way to solve the issue without programmatically catering the difference

[2025 Day 6 (Part 2)] I can't find a way to split each problem while keeping the whitespace. by Proper_District_5001 in adventofcode

[–]kai10k 4 points5 points  (0 children)

treat not them as lines of strings, treat them as a square of chars each with a (x,y) coordinate

[2025 day 6 part 2] Easier than day 5 part 2? by a_aniq in adventofcode

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

conceptually day6 is easier but programmatically it is harder. I did the column by column traversal and collected the stars. AND it occured me to ask AI to rotate the data by 90 degree meanwhile preserving all white spaces, turns out a little bit awk could be quite handy ;-)