Function advent_of_code_2021::day_14::parse_input[−][src]

fn parse_input(
    input: &String
) -> (HashMap<(char, char), usize>, HashMap<(char, char), Vec<(char, char)>>)
Expand description

The types required to make today’s solution work are pretty complex, so there is quite a lot of work here to take a relatively simple input format into the complex format that makes the logic efficient. A bunch of the tests need to convert intermediate polymer string representations into the map of pair counts used internally, so this is delegated to into_pair_counts.