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
I can’t wait Till Miya’s anniversary skin To be released on september 21st
dezoksy [38]

Answer:

no u

Explanation:

no need

3 0
2 years ago
What is the primary uses of cell phone
den301095 [7]

Some primary uses of cell phones include, keeping in touch with friends or family. As well as communicating to work and to have in the event of an emergency.

8 0
3 years ago
Read 2 more answers
How to Ctrl + shift + F4 but in a HP laptop?​
ludmilkaskok [199]

Answer:

Hit the X Button Located on the top right corner or hit Control, Alt, Delete

Explanation:

Hitting the X button will make you exit the whole cite, or hitting Control, Alt, Delet, will make you go to the task bar, in which you can go to the bottom right of that screen and it should say end task

3 0
3 years ago
Read 2 more answers
Which statement describes a printer driver? a) It is the configuration code that is sent to a printer to identify the operating
White raven [17]

Answer:

Option (b) is the correct and suitable answer for the above question.

Explanation:

The printer is a hardware which is used to convert the soft copy of an information to a printed copy (Hard copy) of information.

To use printer hardware a computer system needs a printer driver which is used to do the conversion from soft copy to a hard copy. Hardware printer uses only for the purpose to print the copy.

The option b says that the printer driver is used to convert the document into the form of that document which the printer can understand easily. It means conversion from soft copy to hard copy. Hence it is the right option.

The reason behind the other option which is not valid because--

Option a says that the printer driver is a code but it is a software.

Option c says that the printer driver is an interface but it is a software.

Option d says that the printer driver is a cache but it is a software.

4 0
2 years ago
Me podrian ayudar con esta pregunta...
tamaranim1 [39]
The answer is B , Hope this helps , I don’t speak Spanish but a little bit I understand , I’m sure that’s the correct answer answer
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which type of security personnel may work for government as well as for private security agencies?
    7·2 answers
  • Alicia is a dietitian. She gives other people suggestions for nutrition. She wants to organize a large amount of data concerning
    13·1 answer
  • •What are some conflicts between humans and machines that have arisen in the past?
    14·1 answer
  • Using truth table, prove that:<br><br> (A + B). C = (A . C)+ (B .C) ?
    7·1 answer
  • If you wanted to look up an article from the Chicago Tribune the best place to start would be
    7·1 answer
  • Write an application that determines whether the first two files are located in the same folder as the third one. The program sh
    6·1 answer
  • Acciones de un lápiz
    7·1 answer
  • How to realize dynamic balance of planar closed-chain leg mechanism?​
    7·2 answers
  • You are the system administrator for Precision Accounting Services, which employs 20 accountants and 25 accounting assistants. T
    13·1 answer
  • Lab 8-1: Working with Boot Loader and Runlevels what is the root password
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!