cleanup
This commit is contained in:
parent
2c4288de42
commit
50472363cf
11
src/day25.rs
11
src/day25.rs
@ -15,7 +15,6 @@ impl Graph {
|
|||||||
let mut contracted_vertex_count = self.vertex_count;
|
let mut contracted_vertex_count = self.vertex_count;
|
||||||
let mut contracted: HashMap<String, Vec<String>> = HashMap::new();
|
let mut contracted: HashMap<String, Vec<String>> = HashMap::new();
|
||||||
|
|
||||||
//for _ in 0..contracted_vertex_count {
|
|
||||||
while contracted_vertex_count > 2 {
|
while contracted_vertex_count > 2 {
|
||||||
let random = rand::thread_rng().gen_range(0..contracted_edges.len());
|
let random = rand::thread_rng().gen_range(0..contracted_edges.len());
|
||||||
let edge_to_contract = contracted_edges[random].clone();
|
let edge_to_contract = contracted_edges[random].clone();
|
||||||
@ -84,11 +83,6 @@ fn part1(graph: &Graph) -> usize {
|
|||||||
count1 * count2
|
count1 * count2
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[aoc(day25, part2)]
|
|
||||||
// fn part2(input: &str) -> String {
|
|
||||||
// todo!()
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
@ -112,9 +106,4 @@ frs: qnr lhk lsr";
|
|||||||
fn part1_example() {
|
fn part1_example() {
|
||||||
assert_eq!(part1(&parse(EX)), 54);
|
assert_eq!(part1(&parse(EX)), 54);
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[test]
|
|
||||||
// fn part2_example() {
|
|
||||||
// assert_eq!(part2(&parse("<EXAMPLE>")), "<RESULT>");
|
|
||||||
// }
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user