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::HashSet;
|
||||||
|
use std::collections::VecDeque;
|
||||||
|
|
||||||
static INPUT: &str = include_str!("input.txt");
|
static INPUT: &str = include_str!("input.txt");
|
||||||
|
|
||||||
|
@ -16,9 +16,7 @@ fn solve(input: &str, n: usize) -> i32 {
|
||||||
Some(c) => {
|
Some(c) => {
|
||||||
buffer.pop_front();
|
buffer.pop_front();
|
||||||
buffer.push_back(c);
|
buffer.push_back(c);
|
||||||
let result = buffer.clone().into_iter().all(
|
let result = buffer.clone().into_iter().all(|x| uniqs.insert(x));
|
||||||
|x| uniqs.insert(x.clone())
|
|
||||||
);
|
|
||||||
if result {
|
if result {
|
||||||
return position;
|
return position;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue