(Solved) : 19 41 Consider Following Method Private Treenode Mysteryprocess Treenode Root Root Null Ii Q37849475 . . .
Please answer these multiple choice questions

19, 41) Consider the following method: private TreeNode mysteryProcess (TreeNode root) ifくroot–null II 〔root.getLeft()–nu11 && root.getRightO-nu11)) return null; else root.setLeft(mysteryProcess (root.getLeft()1)1 root.setRight (mysteyProcess (root.getRightt) return root; If root refers to the root of the tree which of the following trees is returned by mysteryProcess (root)? d. a. e. 57.ASuppose a two-dimensional array of chars n has 4 rows and 5 columns and holds the values represented in the picture below: What are the values in n after the following code segment is executed? int r, for (r -l r m.length r) a, e. Questions 12-13 refer to the following method rotate that takes a two-dimensional array a and returns a two-dimensional array b made by rotating a by 90° counterclockwise. public int) rotateintja) rous = <expression 1 int[ 1 b <expression 3>1 for (int 0rower What is the output of the following code segment? 15 List cities new ArrayList(); cities , add(”Atlanta” } ; cities.add “Boston”) for int 0 a < cols c++) b)expreaaion 4 for (int i-1; cities.add(, + i < cities . size(); i++) return b For example, if a holds System.out.println(cities) 1 2 3 4 5 6 a. Atlanta, Boston] . O[Atlanta,+,Boston C.Atlanta, Boston,+ d. [Atlanta, +, Boston, c. ONo output bccause the program gocs into an infinite loop b rotate(a) will hold 3 6 12. Which of the following should replace cexprasston 1>, sexpraasion 2>, and cexpreasion 3>? 18. (AB) What is the output of the following code? cexpression <expression 2> <expression 3> String key – “” Map map = new TreeMap(); for (int k – 0; k < 3; kt+) a a.cols nev int(rovs, cols ne inti11 (ows, cols new int(rovs, cols) new intlrocolsl neu intitl(rows, col8) d. 101.length e. alo0]-lengtih a.length a. length key k; String value-“A”; map.put (key, value); value “Bi map.put9key, value); 13. [AB) Which of the following should replace KB tatementや? a. a[cl[r] e. a[rows – 1- r)leol8 1 e System.out.println (map.size()); b. 2 d. O4 Show transcribed image text
Expert Answer
Answer to 19 41 Consider Following Method Private Treenode Mysteryprocess Treenode Root Root Null Ii Q37849475 . . .
OR