Course Solutions Uncategorized (Solved) : Answering Question Correctly Question Ternary Tree Tree Every Node 3 Children Node 3 Refer Q33026454 . . . .

(Solved) : Answering Question Correctly Question Ternary Tree Tree Every Node 3 Children Node 3 Refer Q33026454 . . . .

 

Am I answering the question correctly?

Question:

3 2 8 6 2 6 0 3

A ternary tree is a tree in which every node can have at most 3children. So, for each node, we have 3 references: left child,right child and the middle child. An example ternary tree isdepicted above. There are four methods to be implemented, describedin the following.

●public int size()

returns the size (number of nodes) ofthe tree. In the depicted example tree, size() returns 10.

●public boolean contains(inttargetKey)

returns true if a target key exists inthe tree, otherwise returns false. In the above example

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post