mirror of
https://github.com/Baipyrus/AoC-23.git
synced 2024-12-26 12:01:45 +00:00
prepare expanding sequences by duplicating last value
This commit is contained in:
parent
630170e636
commit
411784f438
@ -22,6 +22,16 @@ pub fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
fn expand(strct: &mut Vec<Vec<i32>>) {
|
||||
let last = strct
|
||||
.last_mut()
|
||||
.unwrap();
|
||||
last.push(*last
|
||||
.last()
|
||||
.unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
fn extra_diff(seq: Vec<i32>) -> Vec<Vec<i32>> {
|
||||
let mut structure = vec![seq];
|
||||
let mut index = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user