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
A computer’s BIOS is defined as the
Dennis_Churaev [7]
Basic input/output system
5 0
3 years ago
Read 2 more answers
The programming projects of Chapter 4 discussed a Card class that represents a standard playing card. Create a class called Deck
RideAnS [48]

Answer:

Check the explanation

Explanation:

====================Card.java====================

package card_game;

public class Card {

public final static int ACE = 1;

public final static int TWO = 2;

public final static int THREE = 3;

public final static int FOUR = 4;

public final static int FIVE = 5;

public final static int SIX = 6;

public final static int SEVEN = 7;

public final static int EIGHT = 8;

public final static int NINE = 9;

public final static int TEN = 10;

public final static int JACK = 11;

public final static int QUEEN = 12;

public final static int KING = 13;

public final static int CLUBS = 1;

public final static int DIAMONDS = 2;

public final static int HEARTS = 3;

public final static int SPADES = 4;

private final static int NUM_FACES = 13;

private final static int NUM_SUITS = 4;

private int face, suit;

private String faceName, suitName;

// -----------------------------------------------------------------

// Creates a random card.

// -----------------------------------------------------------------

public Card() {

face = (int) (Math.random() * NUM_FACES) + 1;

setFaceName();

suit = (int) (Math.random() * NUM_SUITS) + 1;

setSuitName();

}

// -----------------------------------------------------------------

// Creates a card of the specified suit and face value.

// -----------------------------------------------------------------

public Card(int faceValue, int suitValue) {

face = faceValue;

setFaceName();

suit = suitValue;

setSuitName();

}

// -----------------------------------------------------------------

// Sets the string representation of the face using its stored

// numeric value.

// -----------------------------------------------------------------

private void setFaceName() {

switch (face) {

case ACE:

faceName = "Ace";

break;

case TWO:

faceName = "Two";

break;

case THREE:

faceName = "Three";

break;

case FOUR:

faceName = "Four";

break;

case FIVE:

faceName = "Five";

break;

case SIX:

faceName = "Six";

break;

case SEVEN:

faceName = "Seven";

break;

case EIGHT:

faceName = "Eight";

break;

case NINE:

faceName = "Nine";

break;

case TEN:

faceName = "Ten";

break;

case JACK:

faceName = "Jack";

break;

case QUEEN:

faceName = "Queen";

break;

case KING:

faceName = "King";

break;

}

}

// -----------------------------------------------------------------

// Sets the string representation of the suit using its stored

// numeric value.

// -----------------------------------------------------------------

private void setSuitName() {

switch (suit) {

case CLUBS:

suitName = "Clubs";

break;

case DIAMONDS:

suitName = "Diamonds";

break;

case HEARTS:

suitName = "Hearts";

break;

case SPADES:

suitName = "Spades";

break;

}

}

// -----------------------------------------------------------------

// Determines if this card is higher than the parameter. The

// second parameter determines if aces should be considered high

// (beats a King) or low (lowest of all faces). Uses the suit

// if both cards have the same face.

// -----------------------------------------------------------------

public boolean isHigherThan(Card card2, boolean aceHigh) {

boolean result = false;

if (face == card2.getFace()) {

if (suit > card2.getSuit())

result = true;

}

else {

if (aceHigh && face == ACE)

result = true;

else if (face > card2.getFace())

result = true;

}

}

=========================Sample output=======================

3 0
4 years ago
According to symbolic interaction theory, the internet has helped to remove:
DanielleElmas [232]

Answer:

According to symbolic  interaction theory, the internet has helped to remove:

(D) Time and space barriers.

Explanation:

  • The symbolic interaction theory is such theory which explains that language and symbols are the means of interaction in the social worlds. This theory tells us about the relationship between people in a society.
  • The option a is not correct as the internet has not remove the subculture rather it has provided safe space to it. Sub-culture refers to a group of special interest like group of a biker. Anyone can create their community on the internet.
  • The option b is also incorrect as internet has not remove interpersonal communication rather it has speed up this communication. It is a type of communication in which people communicate with each other via their expression of feelings, verbal and non-verbal means.
  • The option c is also incorrect as the inappropriate content has removed by internet rather now everyone can create content. But regulations and guidelines are being made. A lot of work has been to be done in this area.
  • The option d is correct as the internet has helped to remove the barriers of time and space. It has made this world a global village now anyone from any part of the world can talk to any person to other part of the world over the internet. They can create communities depending upon their interests. They can do business and many other things.
5 0
3 years ago
What does mtu stand for
Nataliya [291]
Michigan technological University
8 0
3 years ago
Read 2 more answers
You want to access the CLI (command line interface) of a Linux terminal at work from your Apple laptop at home. You have the pro
Digiron [165]

Answer:

An SSH server needs to be installed on the remote machine.

Explanation:

An SSH server is what establishes a command line interface remotely, this will allow the remote machine to communicate with the laptop and allow an terminal interface to be used to enter commands and such. An example of an SSH server is OpenSSH Daemon (sshd).

7 0
3 years ago
Other questions:
  • Consider the following method intended to modify the parameter names by removing all instances of the String n.
    14·1 answer
  • What are the tiny little dots that make up a digital photograph?
    8·2 answers
  • Which class of fire extinguisher is appropriate for a fire involving electrical/energized electrical equipment?
    13·2 answers
  • Which of the following Internet protocols is MOST important in reassembling packets and requesting missing packets to form compl
    11·1 answer
  • How many bits long is a autonomous system number?
    13·1 answer
  • To override a method in a subclass, the method must be defined in the subclass using the same signature and compatible return ty
    12·1 answer
  • You've run 200 ft of cable and lost 7dB. What is the loss rate of your cable per 100 ft?
    14·1 answer
  • Factoring is the revers of​
    14·1 answer
  • How many 60 KB jpeg files can be stored on a 2 MB folder in your hard drive?​
    7·1 answer
  • Your class requires you to use a program you must download on your computer. You have waited until day 5 of the week to download
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!