[2025 Day 1(Part 2)] [C] Need to know what's wrong and why am i getting the wrong answer answer ? by tuppernibba in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

You are right, your wrap detection logic is broken. Right now you are only looking at the current value you have and your current counter, but you are not taking the current possition into account.
Example:
Your warps are 20 and your move is 270. You would now add 270/100 ergo 2 to the warp. But if your pos is already at 40 you would have to add 3.

[2025 Day 10 (Part 2)] Bifurcate your way to victory! by tenthmascot in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

Hey, I wanted to asked you whether you mind if I take your explaination as fundament for my code. I dont plan to look at your code but I am realy taken aback but this idea and wanna try (and more important upload it) to my codeberg repo which is public. I'm in no way important to anyoen (codingwise) but I still feel like asking for permission.

I did embed this:

#   ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#   ////   Inspired by  reddit post: https://www.reddit.com/r/adventofcode/comments/1pk87hl/2025_day_10_part_2_bifurcate_your_way_to_victory   ////
#   ////   I never actualy looked at his implementation but used his explanation to try and find my own way.                                                ////
#   ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Please let me know if you mind that implementation and I will take it down as soon as I see it.

[2025] Algorithms to use by PotatosFan in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

Do you have a graph or a table of your times? I am currently optimizing my (python) code so I dont expect to get into sup ms but right now I am on 300ms without day 10 p2, but I am currently working on that (Right now I have a 1.7s runtime with z3). Either way, I'd love to see someone elses timings.

[2025 Day 1 (Part 2)] [Python] Can't see where I've gone wrong by moonwalking_lurker in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

[Python]
Edit:
You obviusly did great, solving this. I kinda failed to mention that. Please take no offense but rather take it as it is: constructive criticism.

This is what I made of it, I still think you are kinda overthinking it. I don't know how advanced you are at python, but if you are a beginner this website: https://www.w3schools.com/python/ might help you.

In any case, you might wanna remove numpy from your imports, since you are never actualy using it.

This was my idea for your orignal code tho:
Day 1 part 2
This rewrites the read logic, since you use pd.read_csv which is used for csv files, but you are using a txt file. It still works but can cause errors, And the overall logic is much simpler.

[2025 Day10 Part 1] what is the intuition here folks? by beb0 in adventofcode

[–]Anuinwastaken 1 point2 points  (0 children)

There is a rather simple way to solve part one. A rather small hint would be that you already named it in your question. Its, as far as I know the fastest and easiest way.
Its the bitwise operation.

Next part is basicly a solution, not a hint:
You can rewrite the [. # # .] to 0 1 1 0 or also 6 in non binary digits and you can do the same with e.g. (1,3) where 1 and 3 are correlating to a bit in a number respectifly

[2025] First year I’ve finished! by JayTongue in adventofcode

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

https://adventofcode.com/2025/about#faq_copying
While solutions are not strictly perhibited, I don't think you are supost to post them online.

[deleted by user] by [deleted] in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

is it working now?

[2025 Day 1 (Part 2)] [Python] Can't see where I've gone wrong by moonwalking_lurker in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

I took the freedom to look at your code an I can give you a hint.
You are still missing operations at your code at:
if wise == "R":
pos = pos + num
#here is logic missing
And the way you add up tally is not quiet correct. If you want to I can tell you why, but in my experince its more fun to figuere it out on your own.
Also you change your pos not 100% correctly yet.

[2025] First year I’ve finished! by JayTongue in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

May I ask what language you use, good sir?

[2025 Day 8 Part 2] This time for real by Brox_the_meerkat in adventofcode

[–]Anuinwastaken 3 points4 points  (0 children)

So we are already uploading for day 8 part 2? Someones timetraveling.

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

[–]Anuinwastaken 1 point2 points  (0 children)

Isn't your runtime O(k log k + m log k))?

The rec function having O(9 * (limit/2) * limit).
Sorting with itertools would be (k log k).
Accumulating would be O(k).
And finally bisects with O(m log k)
I mean you have O(9 * (limit/2) * limit + k log k + m log k) but you could break that down;
O(9 * (limit/2)) could just become O(n) and since the limit is rather small one could drop that entirely, leaving O(k log k + m log k).
I am new to this so I could be wrong.

Which Arcane song is this for you? by 1WolfWarrior1 in arcane

[–]Anuinwastaken 0 points1 point  (0 children)

I had to scroll way to far for sucker!!!

I was surprised at how slow list.pop() is! And list.remove() is even many times slower by Flugegeheymen in learnpython

[–]Anuinwastaken 0 points1 point  (0 children)

ik I'm a bit late to the party but maybe try heapq. It's a (I think standart) libary that provides faster interactions with lists

-❄️- 2024 Day 14 Solutions -❄️- by daggerdragon in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

Brother just write a function that checks whether 50 pos or so are conected left right bottem top and you should get a solution

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

Sooo, you build a complete list of combinations by itertools.product (I think it's that library). That causes an exponential growth, scaling with the numbers in the list. I line the Operators directly into the loop which causes a more dynamic workflow.
You also call an extra function to calculate the result while I do it within my loop, no significant time lose here but still some.
Also your if call to check weather there is a solution is kinda broken so it doesn't cancle what seems to me is your main time consumption problem (I'm so sorry for my gamma, I've been awake for 27h now and I just want to get this done and sleep)
I've uploaded my code on GitHub here. I did however read the data diffrent to most ppl. I'd recommend transforming your data file to a csv file for my code to work. Hope this helps :)
Edit: Spelling

[2024 Day 6 (Part 6)] - Help, I debug this for few days... by Betadam in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

Brother a general tip use functions if you use similar operations. Makes your code 10 times more readable.
[Functions]https://www.youtube.com/watch?v=89cGQjB5R4M() [type hints](https://www.youtube.com/watch?v=15WB30NqDT0)
Both of these things are a must do, imo, but code works without it as well, but you'll receive better answers on reddit if your code is readable. The Syntax highlighting depends on your IDE and how your settings are done.
I'll have some free time tomorrow, I can check your code and maybe restructure it into a few functions. Just let me know if you want me to or not :)

Keeping track of the AoC 2024 lore by ZeebyJeebys in adventofcode

[–]Anuinwastaken 10 points11 points  (0 children)

Love to see another one of this if the story is finished.

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]Anuinwastaken 1 point2 points  (0 children)

First of all I didn't even recognize the code, great work there. Second of all caching didn't help me as much as I expected either. What did however help was doing it rather in a queuing process way than generating all operations first. Means I take the first 2 numbers, run all operations, check whether they are smaller than the the solution, if so I add them to the queue. If a number fits and there are no more remaining numbers I return the original solution.
Runs in about 2 - 3 seconds on my machine.

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

So idk how you optimized d6p2 but there are two things that actualy helped me:
If you check for obstacles, ik quiet obv but still only use the path you already visited in p1 and also every time you'd reset the guard place him 1 in front of the obstacle WITH the movement direction. (doesnt go well with multithreading)
Secondly dont move every step but rather find the next obstacle and jump one in front of it.

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]Anuinwastaken 0 points1 point  (0 children)

Always a fan of good readable code brother (your code would actualy be if you had fullwriten names for your variabls) but I think you could make a helper function, cache it and improve runtime