Show the order of elements in the array after each pass of t…

Show the order of elements in the array after each pass of the bubble-sort algorithm (following the technique given in lecture) applied to the array:                int myArray[8] = {23, 5, 17, 4, 10, 3, 9, 1}    Note: The array is to be sorted with the smallest element in position myArray[0].  Make sure that you show the appropriate number of passes.   Give your answer in the form: Pass 1:  x, y, z, …. Pass 2:  a, b, c … etc

Show the order of elements in the values array after each pa…

Show the order of elements in the values array after each pass of the insertion-sort algorithm, following the procedure given in lecture,  applied to the array:                int values[8] = {3, 8, 5, 4, 6, 2, 9, 1}    Note: The array is to be sorted with the smallest element in position values[0].  Make sure that you show the appropriate number of passe. Use for format: Pass 1:  x,y,z,a,….. Pass 2:  l,m,n,…..   etc