GoLang Solution For LeetCode Problem: Cousins in Binary Tree
Solving Cousins in Binary Tree in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Input: root = [1,2,3,4], x = 4, y = 3 Output: false
Input: root = [1,2,3,null,4,null,5], x = 5, y = 4 Output: true
Input: root = [1,2,3,null,4], x = 2, y = 3 Output: false
See the full details of the problem Cousins in Binary Tree at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go