Question

11. (9 pts) Below is a picture of an array of ints. Show what the array would look like during the first three passes (i.e., the first three executions of the inner loop) of each of the sort algorithms listed below. . Insertion sort 54 23 89 14 7190 88 41 61 31 Selection sort 54 23 8914 71 90 8841 61 31 Bubble sort 54 238914 71 90 884161 31

0 0
Add a comment Improve this question Transcribed image text
Answer #1

VIJAYANT PAGE NO. DATE osition. YOLe previa and find its all ho lalt posidi en , in tint pan-_cernp ap 274 t hem 69751 t3okayVJAYANT PAGE NO. DATE:口1-1 1 and pat it atf fox e maunin g arsa 2veİpossI find minimum 2 ona swap tatwith dt positio 23 s minJAYANT PAGE NO DATE: Bubblsort they are ordey 14 a3a Swap o me Sw ap 88 41 6 31 rdPAGE NO.: (ーーコ DATE: Vh 2pass SA Pa puss repenting por



Hope this helps!


Feel free to ask your doubts in comment section but please please appreciate the efforts by upvoting the answer. Thank you!

Add a comment
Know the answer?
Add Answer to:
11. (9 pts) Below is a picture of an array of ints. Show what the array...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In the Super Simple CPU command 0100000000000101, what does the operand represent? the data to load...

    In the Super Simple CPU command 0100000000000101, what does the operand represent? the data to load the address of the data to load the operation to perform the instruction number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What is the Pep/8 assembly command to read a decimal number into memory? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Write an algorithm to find the max in a list. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For this question, use the following array of values: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 23 41 66 20...

  • Written in Java Your job is to produce a program that sorts a list of numbers...

    Written in Java Your job is to produce a program that sorts a list of numbers in ascending order. Your program will need to read-in, from a file, a list of integers – at which point you should allow the user an option to choose to sort the numbers in ascending order via one of the three Sorting algorithms that we have explored. Your program should use the concept of Polymorphism to provide this sorting feature. As output, you will...

  • An array contains the following characters in the sequence below: V Z D H A Write...

    An array contains the following characters in the sequence below: V Z D H A Write down the characters for each round according to the specified sorting algorithms which sorts the character array into its ascending order. First round always begins at the first location of the array. Bubble Sort Round 1: Round 2: Round 3: Round 4: Round 5: Selection Sort Round 1: Round 2: Round 3: Round 4: Round 5: Insertion Sort Round 1: Round 2: Round 3:...

  • An array contains the following characters in the sequence below: K N M O B Write...

    An array contains the following characters in the sequence below: K N M O B Write down the characters for each round according to the specified sorting algorithms which sorts the character array into its ascending order. First round always begins at the first location of the array. • Bubble Sort Round 1:       Round 2: Round 3: Round 4: Round 5: • Selection Sort Round 1:       Round 2: Round 3: Round 4: Round 5: • Insertion...

  • C++ Sorting and Searching 1. Mark the following statements as true or false. a. A sequential...

    C++ Sorting and Searching 1. Mark the following statements as true or false. a. A sequential search of a list assumes that the list elements are sorted in ascending order. b. A binary search of a list assumes that the list is sorted. 2. Consider the following list: 63 45 32 98 46 57 28 100 Using a sequential search, how many comparisons are required to determine whether the following items are in the list or not? (Recall that comparisons...

  • Consider the below matrixA, which you can copy and paste directly into Matlab.

    Problem #1: Consider the below matrix A, which you can copy and paste directly into Matlab. The matrix contains 3 columns. The first column consists of Test #1 marks, the second column is Test # 2 marks, and the third column is final exam marks for a large linear algebra course. Each row represents a particular student.A = [36 45 75 81 59 73 77 73 73 65 72 78 65 55 83 73 57 78 84 31 60 83...

  • The ExceptionLab class provided: – Creates an array of 100 elements and fills it with random...

    The ExceptionLab class provided: – Creates an array of 100 elements and fills it with random numbers from 1 to 100. – It asks the user for an index value between 0 and 99. – Prints the element at that position. – If a number > 99 is entered by the user, the class will abort with an ArrayIndexOutOfBoundsException • Modify the ExceptionLab: – Add a try-catch clause which intercepts the ArrayIndexOutOfBounds and prints the message: Index value cannot be...

  • Complete function long_list_printer.print_list(). When it's finished, it should be able to print this list, a =...

    Complete function long_list_printer.print_list(). When it's finished, it should be able to print this list, a = [ [93, 80, 99, 72, 86, 84, 85, 41, 69, 31], [15, 37, 58, 59, 98, 40, 63, 84, 87, 15], [48, 50, 43, 68, 69, 43, 46, 83, 11, 50], [52, 49, 87, 77, 39, 21, 84, 13, 27, 82], [64, 49, 12, 42, 24, 54, 43, 69, 62, 44], [54, 90, 67, 43, 72, 17, 22, 83, 28, 68], [18, 12, 10,...

  • C# 1. Given two lengths between 0 and 9, create an rowLength by colLength matrix with...

    C# 1. Given two lengths between 0 and 9, create an rowLength by colLength matrix with each element representing its column and row value, starting from 1. So the element at the first column and the first row will be 11. If either length is out of the range, simply return a null. For exmaple, if colLength = 5 and rowLength = 4, you will see: 11 12 13 14 15 21 22 23 24 25 31 32 33 34...

  • Use C++ (2D Array) Write a program which: 1. Assigns data given below into the 2D...

    Use C++ (2D Array) Write a program which: 1. Assigns data given below into the 2D array of integers which is 10x10. 2. Prints out the contents of the 2D array after assigning the data to make sure correct data was assigned. 3. Figures out and prints out the square root of the sum of ALL the elements in the 2D array. 4. Figures out and prints out the average of ALL THE ELEMENTS in the 2D array. 5. Figures...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT