Removed trailing spaces in day3
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
3cd8684e2a
commit
9ccf4c512c
@ -38,7 +38,7 @@ fn get_most_in_col(v: &Vec<Vec<u32>>, c: usize) -> u32 {
|
||||
|
||||
fn get_o2(v: &Vec<Vec<u32>>, c: usize) -> u32 {
|
||||
if v.len() == 1 { return bit_vec_to_u32(&v[0], false); }
|
||||
|
||||
|
||||
let a = get_most_in_col(&v, c);
|
||||
let f = v.into_iter().filter(|e| e[c] == (a + 1) % 2)
|
||||
.fold(vec![], |mut acc, e| { acc.push(e.to_owned()); return acc;});
|
||||
@ -47,7 +47,7 @@ fn get_o2(v: &Vec<Vec<u32>>, c: usize) -> u32 {
|
||||
|
||||
fn get_co2(v: &Vec<Vec<u32>>, c: usize) -> u32 {
|
||||
if v.len() == 1 { return bit_vec_to_u32(&v[0], false); }
|
||||
|
||||
|
||||
let a = get_most_in_col(&v, c);
|
||||
let f = v.into_iter().filter(|e| e[c] == a)
|
||||
.fold(vec![], |mut acc, e| { acc.push(e.to_owned()); return acc;});
|
||||
|
Loading…
Reference in New Issue
Block a user