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
Digiron [165]
3 years ago
13

Mergesort uses the divide-and-conquer technique to sort a list. True False

Computers and Technology
1 answer:
NARA [144]3 years ago
6 0

Answer:

True: Merge Sort sorts a list using divide-conquer approach.

<u>Merge_Sort(B,p,n)</u>  //p is the starting index of array B and n is the last index.

1. if(p<n)

2.        q ← (p+n)/2    //divides the list into two sub-lists

2.        Merge_Sort(B, p, q) //sorts the left half

3.        Merge_Sort(B, q+1, n) //sorts the right half.

4.        Merge(B, p, q, n)

<u>Merge(B, p, q, n)</u>

1.l ← q-p+1.  //no. of elements in left half

2.m ← n-q  //no. of elements in right half.

3.for x ← 1 to l

4.      Left[x] = B[p+x -1] //The elements of left half are copied to Left array

5.for y ← 1 to m.

6.      Right[y]= B[q+y]  //The elements of right half are copied to right array

7. x ← 1, y ←1

8.for z ← p to n.

9.      if( Left[x] ≤ Right[y] ) // to merge the two lists Left and Right, the    //elements are compared.

10.     {   A[z] ← Left[x]   //smaller one comes to the merged list.

11.          x++. }

12.    else

13.      {   A[z] ← Right[y]

14.          y++ }

Explanation:

The Merge_Sort(A, p, n) algorithm first divides the whole array into two halves. Then again divides the sub-lists into it's halves and so on.

Then using merge algorithm it compares the elements of both halves one by one and keep it in sorted order.

You might be interested in
The blue section of the following Venn diagram could represent which of the following Boolean statements?
Rzqust [24]

Answer:

Last option: <em>Not </em>statement

Explanation:

Anything outside the borders of the circles are considered the <em>not</em> Boolean statement since the circles represent <em>or</em> and the overlap represents <em>and</em>.

Hope this helps :)

3 0
3 years ago
What is a brute force attack? What are the ways you can make it harder for someone to use crack your credentials using a brute f
cricket20 [7]

Explanation:

A brute attack is a method of cracking someone's password/credentials using a predefined set or list of commonly used passwords or from a database leak.

We can prevent our passwords from being brute forced by using a combination of password with no dictionary words and using many symbols and numbers with both upper and lower case characters.

5 0
1 year ago
A county collects property taxes on the assessed value of property, which is 60 percent of its actual value. For example, if a h
Zolol [24]

Answer:

actual_value = float(input("Enter the actual value of a piece of property: "))

tax_rate = float(input("Enter the current tax rate for each $100.00 of assessed value: "))

assessed_value = actual_value * 0.6

tax = (assessed_value * tax_rate) / 100

print("The annual property tax is $" + str(tax))

Explanation:

*The code is in Python.

Ask the user to enter the actual value and the tax rate

Calculate the assessed value, multiply the actual value by 0.6

Calculate the tax, multiply the assessed value by the tax rate and divide result by 100

Print the tax

7 0
4 years ago
Alan is developing a business impact assessment for his organization. He is working with business units to determine the maximum
jekas [21]

Answer:

A. Recovery time objective (RTO)

Explanation:

The recovery time is defined as the maximum length of time require to recover a system or any network from the failure.

Hence, to determine the recovery time of the function, one can use the RTO.

7 0
3 years ago
What purpose does the underlined portion of this excerpt
Rudiy27

Answer:

The below mentioned portion is missing from the question

<em>A part of the sacrifice means the payment of more money in taxes. In my Budget Message I shall recommend that a greater portion of this great defense program be paid for from taxation than we are paying today. No person should try, or be allowed, to get rich out of this program; and the principle of tax payments in accordance with ability to pay should be constantly before our eyes to guide our legislation. </em>

<em />

The passage provides the reason why extra taxes must be collected should America decide to join the war  or it introduces the claim that patriotic Americans should be willing to sacrifice and pay extra taxes.

3 0
4 years ago
Other questions:
  • If people have humility, they don’t tend to see themselves as overly or more important than others. True False
    13·1 answer
  • Which opera component is a solo performance
    10·2 answers
  • True or False? In C++, the expression (a + b / c) / 2 is implicitly parenthesized as ((a + b) / c) / 2.
    9·1 answer
  • What is an example of a primary storage
    13·1 answer
  • I need help please :((((<br> I need it in python
    14·1 answer
  • Express 0.0005 x 10-4 farads as picofarads
    5·2 answers
  • In the mouse properties window you can
    6·1 answer
  • Remember partially filled arrays where the number of elements stored in the array can be less than its capacity (the maximum num
    14·1 answer
  • Who here would like to play among us with me? <br> Time: Friday, November 13
    14·1 answer
  • What is contained in the Open Files section of Shared Folders? ​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!