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
guapka [62]
3 years ago
9

The merge sort algorithm____________.A. Can be used only on vectors of even length.B. Works by reducing vectors down to the base

case of a two-element vector.C. Works by merging two sorted vectors into one larger sorted vector.D. Cannot be implemented recursively. E. None of the above.
Computers and Technology
1 answer:
V125BC [204]3 years ago
8 0

Answer:

C. Works by merging two sorted vectors into one larger sorted vector

Explanation:

Merge sort is an efficient, general-purpose, comparison-based sorting algorithm.

Merge sort repeatedly breaks down a list into several sub-lists until each sublist consists of a single element and <em>merging</em> those sub-lists in a manner that results into a sorted list.

You might be interested in
"Write a class named Car that has the following data attributes:" _ _year_model (for the car’s year model) _ _make (for the make
UkoKoshka [18]

Answer:

public class Car {

   private String __year_model;

   private String __make;

   private int __speed;

   //Creating the constructor

   public Car(String __year_model, String __make, int __speed) {

       this.__year_model = __year_model;

       this.__make = __make;

       this.__speed = __speed;

   }

   //Creatining the set and get methods

   public String get__year_model() {

       return __year_model;

   }

   public void set__year_model(String __year_model) {

       this.__year_model = __year_model;

   }

   public String get__make() {

       return __make;

   }

   public void set__make(String __make) {

       this.__make = __make;

   }

   public int get__speed() {

       return __speed;

   }

   public void set__speed(int __speed) {

       this.__speed = __speed;

   }

}

Explanation:

As stated in the question, The class Car is created using Java programming language with the three attributes year_model, make and speed.

Constructors as well as set and get methods were also created for each of the fields.

6 0
3 years ago
How does a cell phone change the<br> incoming signals from a caller into sound that<br> you can hear
shtirl [24]

Answer:

they send electrical signals to the buzzer. The buzzer changes those electrical signals into sound. You hear the buzzer sound and know that someone is calling you.

Explanation:

8 0
2 years ago
Read 2 more answers
You have a small company and want to keep your costs low, but it is important your employees share data. Which network would pro
Crank

Answer:

centralised

Explanation:

duhh

7 0
3 years ago
Read 2 more answers
Is a computer network that spans a relatively small area, allowing all computer users to connect with each other to share data a
Natalija [7]
The answer is a Local Area Network
5 0
3 years ago
Convert infix to postfix
kvv77 [185]

Answer:

static int checkSymbol(char ch)

{

switch (ch)

{

case '+':

case '-':

return 1;

case '*':

case '/':

return 2;

case '^':

return 3;

}

return -1;

}

static String convertInfixToPostfix(String expression)

{

String calculation = new String("");

Stack<Character> operands = new Stack<>();

Stack<Character> operators = new Stack<>();

 

for (int i = 0; i<expression.length(); ++i)

{

char c = expression.charAt(i);

if (Character.isLetterOrDigit(c))

operands.push(c);

else if (c == '(')

operators.push(c);

 

else if (c == ')')

{

while (!operators.isEmpty() && operators.peek() != '(')

operands.push(operators.pop());

 

if (!operators.isEmpty() && operators.peek() != '(')

return NULL;    

else

operators.pop();

}

else

{

while (!operators.isEmpty() && checkSymbol(c) <= checkSymbol(operators.peek()))

operands.push(operators.pop());

operators.push(c);

}

}

while (!operators.isEmpty())

operands.push(operators.pop());

while (!operands.isEmpty())

calculation+=operands.pop();

calculation=calculation.reverse();

return calculation;

}

Explanation:

  • Create the checkSymbol function to see what symbol is being passed to the stack.
  • Create the convertInfixToPostfix function that keeps track of the operands and the operators stack.
  • Use conditional statements to check whether the character being passed is a letter, digit, symbol or a bracket.
  • While the operators is  not empty, keep pushing the character to the operators stack.
  • At last reverse and return the calculation which has all the results.
4 0
2 years ago
Other questions:
  • When an Ethernet frame arrives at a computer, the Ethernet layer must hand the packet that it contains to the next higher layer
    9·1 answer
  • A network technician has configured a point-to-point interface on a router. Once the fiber optic cables have been run, though, t
    12·1 answer
  • What are the advantage of transistors over vacuum tubes?
    6·1 answer
  • What country threatens Denmark at the beginning of Hamlet as evidenced in Marcellus’s question, "Why this same strict and most o
    13·1 answer
  • Commercial applications are never free<br><br> -True<br><br> -False
    9·1 answer
  • You would like to know how many cells contain data. Which function should you use?
    11·1 answer
  • Jamal is creating a presentation for a report on engineers. He wants to use a template. How can he access different options for
    14·1 answer
  • How can the function anotherFunc2 change the contents of the second element of t?
    5·1 answer
  • ☢☢☢does anyone know how to do the TYNKER CANNON assignment ( lesson 2 intro to game design) I'll give BRANLIEST(¬‿¬)❤ dont answe
    11·2 answers
  • How do you code to find the surface area 6 s2, volume s3 in python
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!