algorithms.tutorialhorizon.com
In a Binary Tree, Check if two nodes are Cousins | Algorithms
Objective: Given a binary tree and two nodes, Check if they are cousins. Cousin Nodes: Cousin nodes are the nodes who are at the same level in the tree and whose parents are siblings.