advent_of_code_2024::day_5

Function sort_pages

source
fn sort_pages(update: &Vec<u32>, rules: &HashMap<u32, HashSet<u32>>) -> Vec<u32>
Expand description

Assuming all pairs of pages have rules that specify an ordering for that pair, use that to provide a sorting function for [Itertools::sorted_by].