Showing posts with label interview question. Show all posts
Showing posts with label interview question. Show all posts

Monday, November 26, 2012

Data Structure Binary Search Tree Interview Question | Problem Solving

Data Structure Binary Search Tree Interview Question | Problem Solving C++ Programming

Data Structure Binary Search Tree Interview Question | Problem Solving

Question

In this problem you have to write a program to check if two given binary trees are structurally equivalent.
Two trees are structurally equivalent if they are both null or if the left and right children of one are structurally equivalent to the RESPECTIVE children of the other. In other words, when you draw the trees on paper, they should LOOK alike (ignoring the values at the nodes).