I want to book 2 hours for an expert. Below are sample question
Consider the following code that build a Binary Tree using the IntBTNode class:
IntBTNode n1 = new IntBTNode(4,null,null);
IntBTNode n2 = new IntBTNode(7,null,null);
IntBTNode n3 = new IntBTNode(6,n1,n2);
IntBTNode n4 = new IntBTNode(1,null,null);
IntBTNode n5 = new IntBTNode(3,n4,n3);
IntBTNode n6 = new IntBTNode(13,null,null);
IntBTNode n7 = new IntBTNode(14,n6,null);
IntBTNode n8 = new IntBTNode(10,null,n7);
IntBTNode n9 = new IntBTNode(8,n5,n8);
What is the data value in the root node of the tree?
Implement astaticmethod, calledextractAll,that takes two input parameters where the first input parameter, calledinputQ,of typeIntQueueInterfacewhile the second input parameter is an integer value calledval. The method returns as output another queue that has the same elements asinputQbut with all occurrences ofvalextracted while keeping all other elements ininputQunchanged and in the same order. The input queue inputQ must remain unchanged after the method.