pub fn part1(input: &[usize]) -> usize
Recursively follow parent relationships all the way to the root COM object. Cache each object’s depth in order to avoid unnecessary work.