You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does someone have a good suggestion on how to organize the code when your solution of part1 also yields the answer to part2? Would I use a global to store the part2 result, and then just return that in the part2 function? Or is there a cleaner way to do it?
The text was updated successfully, but these errors were encountered:
I was just thinking of a nice way to store the result, so I don't have to do the same calculations twice. Maybe there's some nice memoization crate I could use.
Does someone have a good suggestion on how to organize the code when your solution of part1 also yields the answer to part2? Would I use a global to store the part2 result, and then just return that in the part2 function? Or is there a cleaner way to do it?
The text was updated successfully, but these errors were encountered: