Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JAVA easy questions 1. Given the following array (2 pts) intl] a 18, 16, 19, 3,1

ID: 3704900 • Letter: J

Question

JAVA easy questions

1. Given the following array (2 pts) intl] a 18, 16, 19, 3,14, 6 3; a) How are the contents of the array arranged after each pass of the selection sort? b) How are the contents of the array arranged after each pass of the insertion sort? 2. Given the following array (3 pts) intl] b 3, 5, 6, 8, 12, 13, 16, 17, 18, 20 ) What elements of the array are compared (in order) when searching for the number 18 using linear search? b) What elements are compared in order) when searching for 18 using binary search c) How many elements are compared when searching 2 using linear search? How many using binary search? 3. Given the following 2-D array (2 pts) nt[ nums2,3, (2, 4, 6, (3,1,9,. 14,5,633 a) How many rows does nums have? b) How many columns does nums have? c What is stored in nums[2][1]? d) What is stored in nums[I]o]?

Explanation / Answer

1)a Selection sort

1)b)Insertion sort

%please ask 1 question at a time

18 16 19 3 14 6 3 16 19 14 6 18 3 6 19 14 18 16 3 6 14 19 18 16 3 6 14 16 18 19