Question: Please Help complete this prompt, and include ths javascript and html that solves this prompt. These trees are supposed to end up as EQUIVALENT please

Please Help complete this prompt, and include ths javascript and html that solves this prompt. These trees are supposed to end up as EQUIVALENT please make sure they do so. Please check the code output and make sure they end up as equivalent. Create the 2 trees seen in the image. You can call these trees by any name. You will need to implement a BinaryTree Object. This is very similar to making a List where each node points to a Left and a Right Node. A little research should help you get this pretty easily at this point.
The next step is to compare the lists. There are 3 possible states of the Trees;
1. They are unequal they do not contain the same structure or elements
2. They are equivalent they contain the same elements, but not the same structure.
3. They are equal they contain the same structure and elements.
The example trees are equivalent (they both contain 1,2,4,8,16 with a different structure your function(s) should compare the 2 trees and arrive at this conclusion.
Please Help complete this prompt, and include ths

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!