1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lesya [120]
4 years ago
7

Here is an array of ten integers 6 4 0 3 9 8 1 7 2 5

Mathematics
1 answer:
garik1379 [7]4 years ago
6 0

Answer:

[4,0,3,1,2,5] and [6,9,8,7]

Step-by-step explanation:

GIVEN:  an array of ten integers 6,4,0,3,9,8,1,7,2,5.

TO FIND: If we partition this array using Quick sort's partition function and using 5 for the pivot. List the elements of the resulting array after the partition finishes.

SOLUTION:

quick sort is a divide and conquer algorithm in which an array is partitioned into sub-arrays about an pivot element by checking whether elements are greater than pivot or and then sub arrays are sorted recursively.

Here 5 is the pivot element.

two arrays will be created, in first array element less than or equal to pivot element are stored in other elements greater than pivot element are stored.

Starting from first element of array

elements in first array will be =[4,0,3,1,2,5]

elements in second array will be =[6,9,8,7]

Hence the resulting array after the partition finishes are [4,0,3,1,2,5] and [6,9,8,7]

You might be interested in
The pages of a book are numbered 1 to 200 and each leaf is 0.15 mm thick. If each cover is 2.5 mm thick, calculate the thickness
Serga [27]

▪▪▪▪▪▪▪▪▪▪▪▪▪  {\huge\mathfrak{Answer}}▪▪▪▪▪▪▪▪▪▪▪▪▪▪

Thickness of the book is ~

  • 20 \:  mm = 2 \: cm = 0.02m

Refer to the attachment for solution ~

7 0
2 years ago
What is the meassure of XYZ in the diagram below HELP ASSAP :)
yaroslaw [1]
39° or B that should be it
8 0
3 years ago
Read 2 more answers
Evaluate the expression 14C2
lisabon 2012 [21]
\bf _nC_r= \cfrac{n!}{r!(n-r)!}\qquad \qquad _{14}C_2=\cfrac{14!}{2!(14-2)!}
5 0
4 years ago
What is the answer to this question? If x=y, then 6x=6y
Sliva [168]

Answer:

This is a true statement. I think that's what you're asking.

Step-by-step explanation:

It is true because if x=y, than 6x=6y because both sides have a 6 and x=y

8 0
3 years ago
8x-16/x^2-13x+22 please help me I really need it
sasho [114]
The answer is -(5x+16/x^2-22)
8 0
3 years ago
Other questions:
  • The charge for a rental car is $20 plus $0.05 per mile.
    15·1 answer
  • How to find the x intercept in -2/3x+8
    13·1 answer
  • Explain how to simplify the expression (-8)+(-3)+(-4)(7)/14+9(-2). Show the updated expression after each step you take.
    14·1 answer
  • 18 is 5% of what number
    13·2 answers
  • URGENTTT! Can someone please help me with this equation?
    9·2 answers
  • Given that lines b and c are parallel, select all that apply. Which pairs of angles are supplementary?
    6·2 answers
  • Keshia rides her bike 10 miles per hour at this rate how many more minutes will it take her to ride 30 miles than 25 miles
    13·2 answers
  • Translate the phrase into an algebraic expression. The product of 4 and y​
    11·1 answer
  • Which of the following proportionality statements is correct ?
    9·1 answer
  • Let f(x) = x^2 - 11x - 60.<br> Solve for f(x) using factoring.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!