Day 1: Secret Entrance

Megathread guidelines

FAQ

  • Gobbel2000
    link
    fedilink
    arrow-up
    5
    ·
    3 months ago

    Nice solution. Just a little Rust tip if you don’t mind: In this case you can avoid cloning the input Vec in the loops by instead looping over references into the list with for n in self.input.iter() or simpler for n in &self.input. The only difference is that n will be of type &i64 instead of i64.

    • hadesM
      link
      fedilink
      arrow-up
      3
      ·
      3 months ago

      Thanks! I don’t mind tips at all.