Question: java programming please **DETAILED EXPLANATION REQUIRED** Consider the following pseudocode for a sorting algorithm: sorted = false start = 0 end = list.length while (!sorted)

Consider the following pseudocode for a sorting algorithm: sorted = false start = 0 end = list.length while (!sorted) { sorted = true for j from start to end-2{ if (list[j] > list [j+1]) { swap (list[jl, list[j+1]) sorted = false } Q 1 // line 1 if (sorted) break end-- for j from end-2 to start ! if (list[j] > list[j+1]) { swap (list[j],list [j+1]) sorted = false start++ ) // line_2 Assuming list is initially {e, 4, 5, 9, 8, 3, 2, 1). What is the state of the list on line_1 when start = 2? Please write your answer in Blank #1 following the list format used above. E.g. (1, 2, 3, 4, 5) What are the values stored in the variables start and end respectively on line_2? (Please enter an integer for start in Blank #2, and integer for end in Blank #3) Blank # 1 Blank # 2 Blank #3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
