Question: someone please help me with this question Consider the following list of integer indexed from 1 to 8 (i.e intL ist [1]=35,, intL ist [8]=38
someone please help me with this question
Consider the following list of integer indexed from 1 to 8 (i.e intL ist [1]=35,, intL ist [8]=38 ) intList] ={35,12,27,5,18,45,16,38} Consider the following pseudo code version of Bubble Sort (n=8) for j=1 to n1 do for i=1 to n1 do if intList[i] > intList[i+1] swap (intList[i], intList[i+1]) What is the position (index) of element 5 after the second pass? a. 7 b. 8 c. 5 d. 2
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
