Leetcode 3249. Count the Number of Good Nodes | Hello Interview