Longest Univalue Path Leetcode Solution Extension