Question

Name 3 sorting algorithms, give a short description and discuss which one you prefer and why.

Name 3 sorting algorithms, give a short description and discuss which one you prefer and why.

Homework Answers

Answer #1

Answer:

Three sorting algorithm are:

  1. Merge sort : It is based upon divide and conquer algorithm. It divides the array into parts and sort it and at last merges the array.
  2. Selection sort : In this sorting, it finds the minimum element and replace with the first element.
  3. Bubble sort : In this sorting occurs by checking adjacent element and swap it in the order.

I prefer selection sort because it finds the minimum element and swap it at the same time in a sorted manner.

Know the answer?
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
Similar Questions
Problem 2 (2+3 marks). Assume your sorting algorithms have to deal with lists that can potentially...
Problem 2 (2+3 marks). Assume your sorting algorithms have to deal with lists that can potentially contain duplicates. Assume the same sorting algorithms as discussed in class / in the textbook. (a) What is the running time of Insertion Sort when all elements in a given list of length N are equal? Explain your answer. (b) Give a Θ-bound on the running time of Mergesort for the case that all elements in a given list of length N are equal...
1. Summarize two of the four theories of management. Which one do you prefer? Give two...
1. Summarize two of the four theories of management. Which one do you prefer? Give two reasons why you prefer that theory.
Discuss the type of testing (of the 3 main strategies of testing) that you would prefer...
Discuss the type of testing (of the 3 main strategies of testing) that you would prefer to have performed to determine if you were infected with SARS-CoV2.  Why did you choose this type?
Discuss one personal strength and one weakness you have regarding professional presentations. Name one method for...
Discuss one personal strength and one weakness you have regarding professional presentations. Name one method for improvement for each of these, and discuss why it is important for you to work on these skills if you want to present your findings in a more formal setting.
give a short description of each of the following types of business organisation.you can do it...
give a short description of each of the following types of business organisation.you can do it by description the common objection in which the business operates (for example buying or selling activity, profit,charity or a social club). as part of your answer you also need to indicate the environment where this particular business operates . a) sole trader b) partnerships C) limited company d) private company e) public LTD company
1. Name three countries where you would prefer not to use a letter of credit for...
1. Name three countries where you would prefer not to use a letter of credit for transactions. Why did you select those countries?
Of the three main theoretical perspectives, which one would you prefer to use to study society...
Of the three main theoretical perspectives, which one would you prefer to use to study society if you were a sociologist? Why?
which is more difficult, written or spoken communication? why? which do you prefer?
which is more difficult, written or spoken communication? why? which do you prefer?
1.     would you give a relative,friend or stranger one of your kidney? why or why not?...
1.     would you give a relative,friend or stranger one of your kidney? why or why not?    2.     name a gastrointestinal disorder including symptoms and treatments.
As a manager, which the patient care delivery system would you prefer?Why?
As a manager, which the patient care delivery system would you prefer?Why?