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]
3 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]3 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
Find the area of the shaded region. use 3.14 for pi.
stepan [7]

Answer:

18 0 - 60 = 120 \\  \\  \frac{120}{360}  \times \pi {r}^{2}  \\  \frac{1}{3} \times 3.14 \times 4 \times 4 \\  = 16.75 {u}^{2}

<em>Answer</em><em> </em><em>B</em><em> </em><em>is</em><em> </em><em>correct</em><em>.</em>

8 0
3 years ago
A group of 12 students volunteers to collect litter for one day. A sponsor provides 3 juice drinks and 2 sandwiches for each stu
aliya0001 [1]

asan po yung tanong para masgutan ko na po

7 0
2 years ago
Read 2 more answers
Boris is ordering supplies for his company. He ordered 25 boxes of pencils and 40 boxes of pens. What is the ratio of boxes of p
mario62 [17]

Answer:

8:5

Step-by-step explanation:

40:25 can be simplified by diving by 5. You get 8:5 for the ratio of the number of boxes of pens to the number of boxes of pencils, and the ratio cannot be reduced any more from here.

3 0
3 years ago
The bakers at healthy backers can make 230 bagels in 10 hours. How many bagels can they bake in 24 hours
Y_Kistochka [10]
First find the unit rate. 230 divided by 10 which is 23 bagels per hour. So now multiply 23x24 which equals 552 bagels in 24 hours.
6 0
3 years ago
Read 2 more answers
Determine whether the relation R on the set of all Web pages is reflexive, symmetric, antisymmetric, and/or transitive, where (a
xxMikexx [17]

Answer:

a) R is reflexive, R is not symmetric, R is not anti-symmetric, R is transitive.

b) R is reflexive, R is symmetric, R is not anti-symmetric, R is not transitive.

c) R is not reflexive, R is symmetric, R is not anti-symmetric, R is not transitive.

Step-by-step explanation:

a)

(a, b) ∈ R if and only if everyone who has visited Web page a has also visited Web page b.

Obviously R <em>is reflexive</em> (aRa)

Everyone who has visited Web page a has also visited Web page a

R <em>is not symmetric</em> (aRb does not imply bRa)

If everyone who has visited Web page a has also visited Web page b does not mean that everyone who has visited Web page b has also visited Web page a

R <em>is not anti-symmetric</em> (aRb and bRa does not imply a=b)

If everyone who has visited Web page a has also visited Web page b and everyone who has visited Web page b has also visited Web page a does not mean the web pages are the same.

R <em>is transitive</em> (aRb and bRc implies aRc)

If everyone who has visited Web page a has also visited Web page b and everyone who has visited Web page b has also visited Web page c implies that everyone who has visited Web page a has also visited Web page c.

b)

(a, b) ∈ R if and only if there are no common links found on both Web page a and Web page b.

R is obviously <em>reflexive</em> (aRa)

R <em>is symmetric </em>(aRb implies bRa)

if there are no common links found on both Web page a and Web page b, then there are no common links found on both Web page b and Web page a.

R <em>is not anti-symmetric</em> (aRb and bRa does not imply a=b)

if there are no common links found on both Web page a and Web page b and there are no common links found on both Web page b and Web page a does not mean a and b are the same web page.

R <em>is not transitive</em> (aRb and bRc does not imply aRc)

Consider for example three web pages a, b and c such that a and c have a common link and b has no external links at all.

Then obviously (a,b)∈R and (b,c)∈R since b has no links, but (a,c)∉R because they have a common link.

c)

(a, b) ∈ R if and only if there is at least one common link on Web page a and Web page b

R <em>is not reflexive </em>

If the web page a does not have any link at all, then a is not related to a.

R <em>is symmetric </em>(aRb implies bRa)

if there is at least one common link found on Web page a and Web page b, then there is at least one common link found on Web page b and Web page a.

R <em>is not anti-symmetric</em> (aRb and bRa does not imply a=b)

if there is at least one common link found on Web page a and Web page b and there is at least one common link found on Web page b and Web page a does not mean the web pages are the same

R <em>is not transitive</em> (aRb and bRc does not imply aRc)

Consider for example three web pages a, b and c such that a has only two links L1 and L2, b has only two links L2 and L3   c has only two links L3 and L4.  

Then (a, b) ∈ R since a and b have the common link L2, (b, c) ∈ R for b and c have the common link L3, but a and c have no common links, therefore (a,c)∉R

5 0
3 years ago
Other questions:
  • What is measure of angle P?
    10·2 answers
  • Which is an equation of the line that is perpendicular to 3x+y=-5 and passes through the point (3, -7)?
    11·2 answers
  • Which of the inequalities represents the statement "the absolute value of the difference of x and y is greater than 5"?
    5·1 answer
  • Solve the equation for the given replacement set. State the solution set.
    5·1 answer
  • Decompose 35×10 to get an answer of 350
    8·2 answers
  • Find the GCF of 170 anf 210.
    9·2 answers
  • Plz help Name the polygon that has five sides: quadrilateral octagon pentagon
    14·2 answers
  • a furlong is a unit of measure used in horse racing. every year, horses race 10 furlongs in the kentucky derby, one furlong is e
    12·1 answer
  • What is the volume of the extra large tube
    13·1 answer
  • Any equation of the form with is called​ a(n) _______ equation.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!