Rakuten interview question

Codility: - Shortest winter days. - Root to leaf path with maximum distinct nodes.