Leetcode 2867. Count Valid Paths in a Tree | Hello Interview