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
Anestetic [448]
3 years ago
9

Rewrite the MERGE procedure so that it does not use sentinels, instead stopping once either array L or R has had all its element

s copied back to A and then copying the remainder of the other array back into A.
Computers and Technology
1 answer:
Strike441 [17]3 years ago
4 0

Answer:

Merge sort is a sorting technique based on divide and conquer technique.

Explanation:

MERGE(A, p, q, r)

   n1 = q - p + 1

   n2 = r - q

    L[1..n1] and R[1..n2]   this creates the new array

   for i = 1 to n1

       L[i] = A[p + i - 1]

   for j = 1 to n2

       R[j] = A[q + j]

   i = 1

   j = 1

   for k = p to r

       if i > n1

           A[k] = R[j]

           j = j + 1

       else if j > n2

           A[k] = L[i]

           i = i + 1

       else if L[i] ≤ R[j]

           A[k] = L[i]

           i = i + 1

       else

           A[k] = R[j]

           j = j + 1

You might be interested in
Filtering is a function of _____.
Levart [38]
The answer is: switches.

Explanation:

Filtering is a function of switches.
3 0
2 years ago
Sort Sorts by value; assign new numbers as the keys.
JulijaS [17]

Answer: (a) sort()

Explanation:

Using sort() the keys are not preserved. However it sorts the array.

example : sort($array);

6 0
4 years ago
Select the correct answer. Which keyboard feature is a form feed character? A. uppercase letters B. Control key C. lowercase let
Valentin [98]

Answer:

B . control key

Explanation:

dadadadads

4 0
3 years ago
How could you insert a new row between rows 20 and 21?
podryga [215]
Highlight the row(20), then click on the insert cells button under the home ribbon.
3 0
3 years ago
Read 2 more answers
Tissues of the same kind make up _____________ .
muminat
C. Cells, because everything makes up of cells.
5 0
3 years ago
Read 2 more answers
Other questions:
  • A is the smallest unit of application data recognized bysystem software.
    12·1 answer
  • What are the long-term consequences for John’s health and wellness if he continues to use this technique
    15·1 answer
  • I have answered 22 questions and my messages are still not working what is it that i'm doing wrong?
    6·1 answer
  • The engineering firm you work for is submitting a proposal to create an amphitheater at a state park. Proposals must be submitte
    15·1 answer
  • Who would win in a fight iron man or bat man​
    5·2 answers
  • What are some ways to rename a worksheet? Check all that apply.
    9·1 answer
  • The data model shows the_______structrue of database.​
    14·1 answer
  • A _____ focuses on creating software systems like tools, utilities, antivirus programs, and operating systems.
    12·2 answers
  • Lucy wants to access the webpage. She is using her computer to access the webpage. What types of information will be in one fram
    11·1 answer
  • A _____ is a specially formatted file that, once mounted, or connected to a virtual machine appear and operate pretty much ident
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!