12-15-2022 12:56 PM
Anyone doing the advent of code?
I am stuck on day 5. I manually checked 5 steps and it looked right to me. Any edge cases I am not seeing?
12-16-2022 02:55 AM
LV people are doing the AoC, I've pointed them to this thread.
12-16-2022 05:15 AM
Hi Steve,
there is indeed a Advent of Code leaderboard for LabVIEW developers and also a Discord server were we discuss the problems and solutions.
Feel free to join. You can find all the info here :
Best Regards,
Stefan
12-16-2022 02:59 PM - edited 12-16-2022 03:00 PM
I quickly looked at your "solution" and it seems convoluted mostly due to the poor choice of data structures.
In any case, I think your result is correct for your input, assuming element 0 is at the bottom. Could it be you parsed the original stacks in reverse order?
(Unfortunately, you did not include the code where you parse the raw input. Maybe the problem is there!)
12-16-2022 03:17 PM
The cluster of 1D arrays was just a quick and easy way to get the data I wanted. If it was a lot more than 9 stacks I probably would have done an array of clusters of arrays. I could have done a string, but then I would have to futz with string subsets and keeping track of string index. I though array might be better scalable for the next section. I used two for loops because it was easier to keep track of data in my head. Less optimized, but for me easier to read. In the end I guess I was just not typing in the answer correctly. I tried a few hours later and it was accepted.
12-16-2022 04:46 PM
@StevenD wrote:
The cluster of 1D arrays was just a quick and easy way to get the data I wanted.
So did you type the stack inputs in manually. Too many places to introduce mistakes.
I fully parsed the problem input string verbatim..
I used a simple array of strings. The only case structure is to select the part 2 code