Evaluation Test 2016 Winter Prepared by: Berk Soysal
static void mirrorTree(node root){
if(root == null) return;
node left = root.getLeft();node right = root.getRight();node.setLeft(right);node.setRight(left);mirrorTree(right);mirrorTree(left);}
Q3
Q5
4 1 2Node p
Node q = p.next
list2555 100 999
list1.insertAfter(1, list2);
otherFirst otherLast
p.next = otherFirst;otherFirst.previous = p;otherLast.next = q;q.previous = otherLast;