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
andrew-mc [135]
3 years ago
13

Which of the following sorting algorithms is described by this text? "Split the array in two parts. Take each part, and split it

into two parts. Repeat this process until each part has only two items. Check the order of the two items and swap if necessary. Then, take the sorted part and combine it with an adjacent part, sorting as you combine. Repeat until all parts have been combined."
A)Insertion sort

B)Merge sort

C)Heap sort

D)Quick sort

E)Selection sort
Computers and Technology
1 answer:
BartSMP [9]3 years ago
5 0

Answer:

Option(B) i.e "Merge sort " is the correct answer to the given question .

Explanation:

The merge sort follow the approach of divide and conquer technique .It means firstly it divided the given array into the sub parts that sub parts are sorted in comparing the first  value with the adjacent value and perform selection sorting in them it means we swap the value if necessary. This process will continue until all the elements are checked .

  • When the sub parts are  arranged  then we will combine them and getting the new or original array that is in sorted order.
  • When we perform the merge sort  the extra memory is used which is drawback of merge sort .
  • All the other options are not Splitting  the array in two parts and perform sorting so these are incorrect option .
You might be interested in
What happens if i receive a text while my phone is off?
SIZIF [17.4K]
The text will post to your phone when it gets turned on
4 0
3 years ago
Cloud suites are stored on your hard drive and are available anywhere you can access the Internet
puteri [66]
Is that a question or an answer... im confused?!?!

5 0
3 years ago
Subscribe too my you tube channel for a brainiest
dimaraw [331]

Answer:

Ok

Explanation:

4 0
3 years ago
The major objective of this lab is to practice class and object-oriented programming (OOP), and separate files: 1. We will reuse
vovangra [49]

Answer:

Implementation of resistor.cpp

#include "resistor.h"

Ohms::Ohm()

{

// default constructor

voltage=0;

}

Ohms::Ohm( double x) // parameterised constructor

{

voltage = x; // voltage x set to the supply voltage in the private data field called voltage

}

Ohms:: setVoltage(double a)

{

voltage = a;// to set supply voltage in private data field called voltage

}

Ohms::setOneResistance( String s, double p)

{

cin>>p; //enter the resistance value

if(p<=0) // if resistance is less than or equals to 0

return false

else // if re

cin.getline(s);

}

Ohms::getVoltage()

{

return voltage; //return voltage of ckt

}

Ohms::getCurrent()

{

return current; //return current of ckt

}

Ohms:: getNode()

{

return resistors; //return resistors of ckt

}

Ohms::sumResist()

{

double tot_resist = accumulate(resistors.begin(),resistors.end(),0); //std::accumulate function for calculating sum //of vectors and following are the starting and ending points

return tot_resist;

}

Ohms::calcCurrent()

{

if(current <=0) // if current is less than or equal to 0

return false;

else   // if current is greater than 0

return true;

}

Ohms:: calcVoltageAcross()

{

if(voltage<=0) // if voltage is less than or equal to 0

return false;

else //if voltage greater than 0

return true;

}

Explanation:

in the case of main.cpp its simple just make a class object and remember to include resistors.cpp with it for which the second last picture describes the process precisely. (Hint: Use theunit test case functions in the main.cpp).

As you can see node is a structure consisting of member variables, followed by a class Ohms representing a DC circuit.

By looking at these pictures, it is needed to implement the main.cpp and resistor.cpp files. The user defined header file resistor.h already consists of all contents of Class Ohm, struct node. You don't need to modify it in anyway in such case.

8 0
3 years ago
Differences of a desktop computer and a laptop
Ilya [14]

Answer:

Desktop can't move easily, not portable. Laptop very portable.

Explanation:

6 0
3 years ago
Other questions:
  • List two ways that guest could be defined
    12·2 answers
  • When someone registers a domain name that is a company's trademark, hoping to resell it to the company at an exorbitant profit,
    14·2 answers
  • Drag each label to the correct image.
    9·2 answers
  • I need help on this ASAP, worth 93 points
    6·2 answers
  • Greg is the network administrator for a large stadium that hosts many events throughout the course of the year. They equip usher
    7·1 answer
  • . Select the advantages of RAID-5 relative to other RAID schemes. (MAY SELECT MULTIPLE)
    7·1 answer
  • Hi, please help me complete my Database Development 2 hw by completing what should been done from the document and show the code
    11·1 answer
  • Write a function solution that, given an array A consisting of N integers, returns the number of fragements of A whose sum equal
    9·1 answer
  • Is the flow of power reversible in a leadscrew?
    11·1 answer
  • Algorithm to eat orange<br><br>​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!