forgot to run checks on day 6 :(
This commit is contained in:
parent
22e444e6ea
commit
454e468d93
|
@ -1,5 +1,5 @@
|
|||
use std::collections::VecDeque;
|
||||
use std::collections::HashSet;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
static INPUT: &str = include_str!("input.txt");
|
||||
|
||||
|
@ -16,9 +16,7 @@ fn solve(input: &str, n: usize) -> i32 {
|
|||
Some(c) => {
|
||||
buffer.pop_front();
|
||||
buffer.push_back(c);
|
||||
let result = buffer.clone().into_iter().all(
|
||||
|x| uniqs.insert(x.clone())
|
||||
);
|
||||
let result = buffer.clone().into_iter().all(|x| uniqs.insert(x));
|
||||
if result {
|
||||
return position;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue