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
Which folder does the ipad saves my pictures?
saw5 [17]
It will save it in the pre-installed iphotos application.
Hope this helps. <span />
4 0
2 years ago
Read 2 more answers
Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and a
pshichka [43]
Int   k=0.total=0;
while(k++<50)
    total+=k*k;
    

5 0
3 years ago
Write a program that prompts the user for an integer, then asks the user to enter that many values. Store these values in an arr
Svetllana [295]

Answer:

//The Scanner class is imported to allow the program receive user input

import java.util.Scanner;

//The class Solution is defined

public class Solution {

   //The main method is defined here and signify the beginning of program execution

   public static void main(String args[]) {

       

       //Scanner object 'scan' is created to receive user input

       Scanner scan = new Scanner(System.in);

       //Prompt display to the user to enter size of array

       System.out.print("Enter the range of array: ");

       //User input is assigned to arraySize

       int arraySize = scan.nextInt();

       //userArray is initialized with arraySize as its size

       int[] userArray = new int[arraySize];

       

       //counter to count number of array element

       int count = 0;

       //while loop which continue executing till the user finish entering the array element

       while (count < arraySize){

           System.out.print("Enter each element of the array: ");

           userArray[count] = scan.nextInt();

           count++;

       }

       

       //A blank line is printed for clarity

       System.out.println();

       

       //for loop to print each element of the array on straight line

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

           System.out.print(userArray[i] + " ");

       }

       

       //A blank line is printed for clarity

       System.out.println();

       

       //for loop is use to reverse the array in-place

       for(int i=0; i<userArray.length/2; i++){

           int temp = userArray[i];

           userArray[i] = userArray[userArray.length -i -1];

           userArray[userArray.length -i -1] = temp;

       }

       

       //for loop to print each element of the reversed array on straight line

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

           System.out.print(userArray[i] + " ");

       }

     

   }

}

Explanation:

The program is commented to give detailed explanation.

The for-loop use in reversing the array works by first dividing the array into two half and exchanging the first half elements with the second half elements. The element from the first half is assigned to temp variable on each loop, then the element is replaced with the equivalent element from the second half. And the element from the second half is replaced with the value of temp.

3 0
3 years ago
Why does it help to differentiate among self-esteem,self-image, and self value
joja [24]

Evaluation of one’s own worth is termed as self-esteem. Each person will take the defeat and pointed out mistake in different manner. One person may shout if somebody points out mistake and another may handle it with smile. Self-esteem plays the role here.

Self image is an imaginary of picture of how an individual is in their own perspective and how the same person in the view of other person’s perspective. This is one of the important traits of the people.

Self-value: Setting a value of one self, analyzing various situations and facts and stamping the seal as either “good” or “bad” is called self-value.

8 0
3 years ago
Read 2 more answers
Tasha purchased a new tablet. She has several questions about how to connect to the internet, download apps, install software, a
lutik1710 [3]
The answer is D because a toutourial can explain each and everey process

6 0
3 years ago
Other questions:
  • In your own words, describe the structure and function of both the stack and queue data structure and discuss how they are diffe
    6·1 answer
  • Wap-enabled devices require a ________, a special web browser that has all the features of computer-based browsers but is simpli
    11·1 answer
  • If anybody knows what does this mean I will answer any questions for you and plz answer this right plz what does that envelope w
    5·2 answers
  • HELP ASAP
    10·2 answers
  • Select the correct answer.
    7·1 answer
  • The ________ option contains the formatting and placeholders for all of the items that appear on a side.
    11·1 answer
  • What is the square root of 1600 and 36 ?​
    6·1 answer
  • Select the correct answer from each drop-down menu. Look at Marta's email signature and fill in the missing elements. Marta D'Ab
    14·2 answers
  • Why might a business choose a server-based network over a peer-to-peer network?
    15·1 answer
  • 6. kinukuha nito ang kabuuang bilang ng mga numerical na datos sa mga piniling cells
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!