a)10, b)11, c) 12, d)13
b)
c)
d)
1. Print Mystery Number What will the following method print? Java: public void printMysteryNumber() { int j = 0; for (int i = 3; i <7; 1++) { if (i > 4) { j: j + 4; } } System.out.print(3); } Python: def printMysteryNumber(): j= for i in range(3, 7): if (i > 4): j=j+i print()
2. Binary Search Analysis Knowing that the tree below is a binary search tree, which numbers would we pass through while looking for 22 using binary search? 20 / 15 22 Pick ONE option 9, 10, 15, 20 10,20 10,15 10, 15, 20
3. Static Code Analysis 10 What will be the output of the following code: INTEGER n; n = 100; QUEUE 4; while (n > e) q.push(n % 3) n/= 3 while (q.size()) PRINT q. front() 4.pop() Pick ONE option 10201 20102 10121 10102
O 7. Choose a Data Structure A web browser must keep track of the sites that you have visited so that when you click the back button it will return you to the most recent site. Which of the following data structures has a functionality that best supports the described display of previously visited sites? 1 2 Pick ONE option Stack Queue Priority Queve TreeNode Binary Tree Clear Selection
1. Print Mystery Number What will the following method print? Java: public void printMysteryNumber() { int j = 0; for (i
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
1. Print Mystery Number What will the following method print? Java: public void printMysteryNumber() { int j = 0; for (i
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!