Question

I have the following question please: Consider the following sequence of numbers 8, 1, 11, 4,...

I have the following question please:

Consider the following sequence of numbers 8, 1, 11, 4, 2, 9, 10, 5, 3, 12, 6, 7

Sort the list using quick sort with the middle element as pivot. Show the state of the list after each call to the partition procedure.
You are not required to write code for this question. You need to trace through the different sorting algorithms using the given list

Please could you provide me with a complete answer as well an explanation of how you got to that answer. I'm having a really difficult time understanding this question

Thank you

Homework Answers

Answer #1

`Hey,

Note: In case of any queries, just comment in box I would be very happy to assist all your queries

[8, 1, 11, 4, 2, 9, 10, 5, 3, 12, 6, 7]

[8,1,3,4,5,3,6,7,9,10]----[11,12]

[1,3,3]---[8,4,5,6,7,9,10]----[11]----[12]

[1,3]--[3]---[4,5,6]---[8,7,9,10]----[11]---[12]

[1]---[3]---[3]---[4,5]---[6]-----[8,7,9]----[10]---[11]---[12]

[1]---[3]---[3]---[4]----[5]---[6]-----[7]----[8,9]----[10]---[11]---[12]

[1]---[3]---[3]---[4]----[5]---[6]-----[7]----[8]----[9]----[10]---[11]---[12]

[1,3]--[3]--[4,5]---[6]--[7]--[8,9]--[10]---[11]---[12]

[1,3,3]---[4,5,6]---[6]---[7,8,9]----[10]---[11]---[12]

[1,3,3,4,5,6,7,8,9,10,11,12]

Kindly revert for any queries

Thanks.

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
Consider the following sequence of numbers 8, 1, 11, 4, 2, 9, 10, 5, 3, 12,...
Consider the following sequence of numbers 8, 1, 11, 4, 2, 9, 10, 5, 3, 12, 6, 7 c) Sort the list using quick sort with the middle element as pivot. Show the state of the list after each call to the partition procedure. You are not required to write code for this question. You need to trace through the different sorting algorithms using the given list. Please could I get an answer to the above question through using 9...
in C++ Please and thanks Here is a list of 6 numbers. Use the selection sort...
in C++ Please and thanks Here is a list of 6 numbers. Use the selection sort algorithm to sort this list. Fill in this table with each iteration of the loop in the selection sort algorithm. Mark the place from which you are looking for the 'next smallest element'. In this display, the upper numbers are the indices, the lower numbers are in the corresponding positions. Use the several rows provided to show the sequence of steps. 0 1 2...
Question 4 please although I am unsure of my answers for the rest as well :(...
Question 4 please although I am unsure of my answers for the rest as well :( Here is the full list for background info. Consider a significance test for a null hypothesis versus a two-sided alternative. State all values of a standard normal test statistic z that will give a result significant at the 10% level but not at the 5% level of significance. (Sec. 6.2) You perform 1,000 significance tests using α = 0.01. Assuming that all the null...
Java question, Please answer everything. Thank you Answer the following questions as briefly (but completely) as...
Java question, Please answer everything. Thank you Answer the following questions as briefly (but completely) as possible: What is a checked exception, and what is an unchecked exception? What is NullPointerException? Which of the following statements (if any) will throw an exception? If no exception is thrown, what is the output? 1: System.out.println( 1 / 0 ); 2: System.out.println( 1.0 / 0 ); Point out the problem in the following code. Does the code throw any exceptions? 1: long value...
1. For the following experiment/question, pick the most appropriate statistical test. You have the following statistical...
1. For the following experiment/question, pick the most appropriate statistical test. You have the following statistical tests as choices: some may be used more than once, others not at all. Assume homogeneity of variance (where applicable) and the validity of parametric tests (where applicable), unless something is directly stated (e.g., “the data are not at all normal”) or otherwise indicated (viz., by the inspection of the data) which would indicate a strong and obvious violation of an assumption. This means...
Which of the following correctly applies capitalization rules? Group of answer choices I heard Jay say...
Which of the following correctly applies capitalization rules? Group of answer choices I heard Jay say that he “Wants to be transferred to our Houston office.” Our midwest region is performing better than any of us dreamed possible. He will finish his Bachelor’s degree in May. What about his education? His experience? His potential for promotion? Flag this Question Question 61 pts Which of the following sentences demonstrates correct word usage? Group of answer choices Your involvement with drugs in...
Hi, please can you show me the correct answers to these questions? Thanks Question 16 1.    ...
Hi, please can you show me the correct answers to these questions? Thanks Question 16 1.     Which of the following best describes a linear presentation? 1. Linear presentations use a backchannel such as Twitter. 2. Linear presentations build the message point by point and end with a conclusion following logical steps. 3. Linear presentations are best developed with interactive slide software such as Prezi. 4. Linear presentations are given before a live audience with a question and answer opportunity. 5....
QUESTION 1 1. Brianna is trying to increase her chances of being promoted to vice president...
QUESTION 1 1. Brianna is trying to increase her chances of being promoted to vice president by working to build good work relationships with other managers outside her own department. Brianna's behavior should be viewed as dysfunctional politics. functional politics. coercive power. functional influence. 2 points QUESTION 2 1. The Gingerbread Factory has a separate unit that makes their chocolate crunch cookies and another unit that is completely responsible for all operations in producing their ginger snap cookies. The Gingerbread...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT