Question

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

  1. 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:

Round 4:

Round 5:

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

If you have any doubts, please give me comment...

  • Bubble Sort

Round 1:

V

Z

D

H

A

Round 2:

V

D

H

A

Z

Round 3:

D

H

A

V

Z

Round 4:

D

A

H

V Z

Round 5:

A

D

H

V

Z

  • Selection Sort

Round 1:

V

Z

D

H

A

Round 2:

A

Z

D

H

V

Round 3:

A

D

Z

H

V

Round 4:

A

D

H

Z

V

Round 5:

A

D

H

V

Z

  • Insertion Sort

Round 1:

V

Z

D

H

A

Round 2:

V

Z

D

H

A

Round 3:

D

V

Z

H

A

Round 4:

D

H

V

Z

A

Round 5:

A

D

H

V

Z

Add a comment
Know the answer?
Add Answer to:
An array contains the following characters in the sequence below: V Z D H A Write...
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
  • 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...

  • Please come up with an array of 9 random integers then sort the array. Show the...

    Please come up with an array of 9 random integers then sort the array. Show the contents of the array each time a sorting algorithm changes it while sorting the array into ascending order. The 6 sorting algorithm we are using are: 1. Selection Sort 3 points 2. Insertion Sort 3 points 3. Shell Sort 6 points 4. Bubble Sort 3 points 5. Merge Sort 10 points 6. Quick Sort 10 points It is OK to do this assignment on...

  • PROBLEM #11 What are the two algorithms used to sort an array? How do they work?...

    PROBLEM #11 What are the two algorithms used to sort an array? How do they work? -------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------------------------- PROBLEM #12 Given the following array 'jumbled', what will the array be after the first swap of a selection sort algorithm? (Assume the algorithm sorts in ascending order). --------------------------------------------------------------------------------------------------------------- */ int jumbled[] = {12, 5, 3, 1, 9, 100, 45}; /* --------------------------------------------------------------------------------------------------------------- PROBLEM #13 Given the following array 'jumbled2', what will the array be after the third swap of a...

  • 6. (10 points) Trace insertion sort algorithm as it sorts the following sequence of integer array...

    6. (10 points) Trace insertion sort algorithm as it sorts the following sequence of integer array into an ascending order. 17 3 12

  • ?PLEASE READ CAREFULLY QUESTION #1 I’m doing a project which requires you to implement 4 sorting...

    ?PLEASE READ CAREFULLY QUESTION #1 I’m doing a project which requires you to implement 4 sorting algorithms. Bubble sort pair-wise, Bubble sort list-wise a.k.a selection sort, merge sort, and quick sort. These 4 sorting methods takes in an array of strings and sorts them alphabetically from a-z. I have all 4 sorting algorithms working fine, but I still need to fill out the table. There’s only one section I need help filling out. I basically need help filling out the...

  • Need help with program. I'm stuck Objectives: In this assignment, we will practice manipulating lists of...

    Need help with program. I'm stuck Objectives: In this assignment, we will practice manipulating lists of data and arranging items in an ascending/descending order. you will also explore storing lists/arrays using different sorting algorithms including, the selection sort, bubble sort, and insertion sort algorithm. Comparison between the three algorithms are made based on the number of comparisons and item assignments (basic operations) each algorithms executes. Background: Ordering the elements of a list is a problem that occurs in many computer...

  • algorithms design and analysis syllabus

    Write a c++ program to implement sorting algorithms. program takes n number of elements from the user (where n is specified by the user) and stores data in an array.sorting algorithms are:1. Merge sort2. Insertion sort3. Bubble sortAfter writing the program:Run the program on input (n) sizes of  10000, 20000,30000. and record the execution time  and space for all input sizes.Hint use the random function to generate elements of the array

  • does anyone know how to do this? C++ Your task for this assignment is to use...

    does anyone know how to do this? C++ Your task for this assignment is to use C++ language to implement an insertion sort algorithm. 1. Implement an insertion sort with an array to sort 10 arbitrary numbers using the C++ programming language. The program initializes an array with 10 random 3-digit positive integers. The program then sorts the numbers in the array using the insertion sort algorithm. 2. The program displays the original values in the array before the sort...

  •   Given a bubble sort and the following array: [10,7,19,5,16] What are the values after the first...

      Given a bubble sort and the following array: [10,7,19,5,16] What are the values after the first iteration? Given an insertion sort and the following array: [50,5,35,70,6] What does the array look like after the first insertion:    Fill in the missing code for InsertionSort method // Insertion Sort method //sorts an array of Auto objects public static void insertionSort(Auto [] arr) { Auto temp; int j; for (int i=1; i<arr.length; i++) {     j=i;     temp=arr[i];                while (j!=0 &&(temp.getModel().compareTo(arr[[j-1].getModel())<0)...

  • Suppose an array contains the sequence of values 8, 6, 10, 5, and 4. If the...

    Suppose an array contains the sequence of values 8, 6, 10, 5, and 4. If the selection sort algorithm is used to sort the values, what is the first pair of values to be swapped? Select one: a. 8 and 5 b. 10 and 5 c. 8 and 10 d. 8 and 4

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