Given the root of a binary tree with unique values and two distinct node values a and b, find the distance between these two nodes. The distance is defined as the minimum number of edges traversed to…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.