mirror of
https://github.com/Baipyrus/AoC-23.git
synced 2024-11-15 02:03:49 +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>> {
|
fn extra_diff(seq: Vec<i32>) -> Vec<Vec<i32>> {
|
||||||
let mut structure = vec![seq];
|
let mut structure = vec![seq];
|
||||||
let mut index = 0;
|
let mut index = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user