Leetcode Longest Path With Different Adjacent Characters