You are reading a single comment by @Greenbank and its replies. Click here to read the full conversation.
  • If you're aiming for optimal then it's almost certainly less computationally intensive to precalculate all of the values using addition rather than using Gauss' formula each and every time you need a value.

  • Is that what it's doing? I don't know anything about scala.

    I tried to memoize my Gauss results - it was slower than recalculating every time. The list is pretty short I suppose.

    You don't actually need to run any optimisation for fuel anyway. Median and mean should be within 1 of the right answer for part 1/2 respectively. You just have to check the nearest couple of ints

About

Avatar for Greenbank @Greenbank started