Question: in c++ programming code do the following: 2. If your nameArray variable is sorted using Bubble Sort Algorithm, it will go through a several pass-throughs

in c++ programming code do the following:

in c++ programming code do the following: 2. If your nameArray variable

2. If your nameArray variable is sorted using Bubble Sort Algorithm, it will go through a several pass-throughs and characters will be swapped in each pass-through, until nameArray gets completed sorted (alphabetically ascending order). Show all these stages (Passes and iterations within Passes) for your nameArray. Based on our example, here is a sample of how I want you to write these steps ass JO NP DOEOJN P DOE Note: O and J were swapped O J N] P D OEO IN J P DOE Note: N and J were swapped O J N] P D OEO IN J P DOE Note: N and J were swapped ONU P DOE ON [J P] DOE No Swap ONJ [P D OEONJ [D P OE Note: D and P were swapped ONJDIP OEONJD[O P]E Note: O and P were swapped ONJDOP E>ONJDO E P Note: E and P were swapped ass-2 ON JDOPEON JDOEP Note: No Swap ON J D OPE OUN] DOEP Note: J and N were swapped .(so on, until the array is completely sorted) How many passes were required? How many iterations within each pass? How many swaps were performed? 3. Repeat the same process with nameArray and this time show the stages when Selection Sort Algorithm is used How many iterations were required

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!