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
Quick algebra 1 question for 50 points! <br><br><br> Only answer if you know the answer, Tysm!
Juliette [100K]
<h2>A)</h2>

revenue = selling \: price \times quantity \: sold

m(t) = 3t

<h2>B)</h2><h3>Since we only have 75 tickets to sell, the domain is:</h3><h2>t ε [ 0 , 75 ]</h2>

<h2>Range: (extra)</h2><h2>m ε [ 0 , 225 ] </h2>
8 0
1 year ago
Read 2 more answers
Add the first 12 terms of this sequence:<br> 15, 45, 135, 405, 1215, ...
UkoKoshka [18]

Answer:

Step-by-step explanation:

a₁ = 15

a₂/a₁ = 45/15 = 3

a₃/a₂ = 135/45 = 3

...

It is a geometric sequence with a common ratio r=3.

Sum of first 12 terms = a₁·(1-r¹²)/(1-r)

= 15·(1-3¹²)/(1-3)

= 15·(-531,441)/(-2)

= 3,985,800

7 0
2 years ago
Mathematical problem solving skills can be important in everyday life. true or false.
sleet_krkn [62]
True. maths is applied in every day life for instance in science and accounting and as well as when daily with money

5 0
3 years ago
Read 2 more answers
PLZZ help me with this I really need your help
Georgia [21]
Basil yum just use ur brain and find out before asking for help, ask ur teacher or somthin
5 0
3 years ago
Read 2 more answers
Please help quickly i really need it
wariber [46]

Answer:

(x - 6)² = 18

Step-by-step explanation:

(x - 6)² = 18

x² - 12x + 36 = 18

x² - 12x + 18

6 0
2 years ago
Other questions:
  • The ratio of the games the falcons won to the games they lost is 7:5 what is the total number of games played? show work if poss
    14·1 answer
  • Find the distance between the two points rounding to the nearest tenth (if necessary).
    13·2 answers
  • A box contains 10 colored balls. 5 balls are green, 3 balls are red and 2 balls are yellow. One ball is selected at random. What
    5·1 answer
  • If 596 people voted in the election how many people is 25%
    12·2 answers
  • How many ounces are equivalent to 25 pounds?
    13·2 answers
  • Find the equation of a parabola with a focus at (0,-1) and a directrix at y = 4.
    8·1 answer
  • What is the conditional probability that a person who rode a rollercoaster also attended a musical review show
    5·1 answer
  • A square has a perimeter of 40 inches. What is it’s area?
    5·1 answer
  • -5n-3(n+2)=18<br> what is n?
    9·2 answers
  • What is the following product?<br> 3v2(5v6-7v3)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!