diff --git a/day15/src/main.rs b/day15/src/main.rs index 89b3787..de3c462 100644 --- a/day15/src/main.rs +++ b/day15/src/main.rs @@ -6,9 +6,7 @@ fn main() { // let mut memory: HashMap = HashMap::new(); let mut memory: Vec> = Vec::with_capacity(30_000_000); - for _i in 0..30_000_000 { - memory.push(None) - } + memory.resize(30_000_000, None); let mut last = input[0]; for turn in 1..30_000_000 {