What value is retrieved from the queue by the last peek() op…

What value is retrieved from the queue by the last peek() operation in the following list of Queue operations? (2 points) enqueue(“Edward”) enqueue(“Ben”) enqueue(“Mike”) enqueue(“Janet”) enqueue(“Alan”) peek() dequeue() peek() dequeue() peek() dequeue() dequeue() peek() Write your answer in the text box below.

Given the Binary Search Tree of names in Figure 11.5 in the…

Given the Binary Search Tree of names in Figure 11.5 in the textbook:     Write the preorder, inorder and postorder traversals of this tree in the text box below.  Remember, “visiting” a node means displaying the “name” data field within that node.  Be sure to clearly label the lists of names with “preorder”, “inorder” and “postorder” (6 points).

Given the following Binary Search Tree of integers: And the…

Given the following Binary Search Tree of integers: And the following method stub: public void postOrder(TreeNode r) {} Copy the method header above into the text box below, then write the implementation (the body) of the postOrder() method so that it performs a recursive postorder traversal  of this Binary Search Tree of integer numbers.  Assume that the reference parameter r is initially passed the reference of the root node of the tree (5 points). (Hint: This postOrder() traversal method should be very simple, consisting of a single System.out.println() statement and two if conditions which each contain a single recursive statement).