Question: NOTE: for each question, write exact answer ( do NOT write approximate answer or in terms of big - O ) . Refer to the
NOTE: for each question, write exact answer do NOT write approximate answer or in terms of bigO
Refer to the following pseudocode algorithms to give precise answers to the questions in the provided screenshot:
Insertion Sort:
for j to Alength
keyAj
ij
whilei and Aikey
AiAi
ii
Aikey
Original Bubble Sort:
for i to Alength
for jAlength down to i
ifAj Aj
Exchange Aj with Aj
Modified Bubble Sort:
for i to Alength
boolean swap false
for jAlength down to i
ifAj Aj
Exchange Aj with Aj
swap true
ifswap false
break
Merge Sort:
MERGESORTA p r
ifp
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
