Compare commits
1 Commits
6ac65a7408
...
bb74658f9c
| Author | SHA1 | Date | |
|---|---|---|---|
| bb74658f9c |
@ -180,7 +180,7 @@ fn build_lookup(input: &str) -> Result<HashMap<String, &str>> {
|
|||||||
// 2, 3 and 5 have 5 segments:
|
// 2, 3 and 5 have 5 segments:
|
||||||
// 3 has overlap w/ 1
|
// 3 has overlap w/ 1
|
||||||
// 5 is a subset of 9
|
// 5 is a subset of 9
|
||||||
// 2 isn't a subset of 6.
|
// 2 is the left overs.
|
||||||
set.iter().filter(|s| s.len() == 5).for_each(|d| {
|
set.iter().filter(|s| s.len() == 5).for_each(|d| {
|
||||||
let s: HashSet<_> = d.chars().collect();
|
let s: HashSet<_> = d.chars().collect();
|
||||||
let one_int: HashSet<_> = s.intersection(&one).cloned().collect();
|
let one_int: HashSet<_> = s.intersection(&one).cloned().collect();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user