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
Paladinen [302]
3 years ago
5

Identify the correct shell sort algorithm for the given interleaved sorting. InsertionSortInterleaved(numbers, numbersSize, star

tIndex, gap) {
i = 0
j = 0
temp = 0 // Temporary variable for swap
for (i = startIndex + gap; i < numbersSize; i = i + gap) {
j = i
while (j - gap >= startIndex && numbers[j] < numbers[j - gap]) {
temp = numbers[j]
numbers[j] = numbers[j - gap]
numbers[j - gap] = temp
j = j - gap
}
}
}
ShellSortistOfGames, listSize, gapValues) {
for each gapValue in gapValues)
for (i = gapValue; i > 0; i--) {
Insertion Sortinterleaved listOfGames, listSize, 1. gapValue)
O }
}
}
ShellSortlist, listSize, gapValues) (
for each (gapValue in gapValue)
for (i = 1; i < gapValue; ++) {
InsertionSortinterleaved listofGames, listSize, i, gapValue)
O }
}
}
ShellSortinumbers, numbers Size, gapValues) {
for each (gapValue in gapValues) {
for (i = 0; i InsertionSortinterleaved numbers, numbersSize, igapValue)
O }
}
}
ShollSortistOfGames, listSize, gapValues) (
for each (gapValue in gapValues) {
Insertion SortinterleavedlistOfGames, listSize)
O }
}
}
Computers and Technology
1 answer:
Sergio039 [100]3 years ago
8 0
Sinturda Okayama 314 magnolia
You might be interested in
The elements of an integer-valued array can be set to 0 (i.e., the array can be cleared) recursively as follows: An array of siz
dangina [55]

Answer:

The method definition to this question can be given as:

Method definition:

public void clear(int[] arr, int num) //define method clear.

{

   if (num == 0) //if block

{

       return 0;  return value.

}

else //else block

{

 arr[num - 1] = 0; //assign value in arr.

return arr[];  //return value.

}

}

clear(arr, num - 1);   //calling

Explanation:

The description of the above method definition as follows:

  • Firstly we define a method that is "clear" that does not return any value because its return type is "void". This method accepts two integer variables that are "arr[] and num" where arr[] is an array variable and num is an integer variable.
  • Inside a method, we use a conditional statement in if block we check that num variable value is equal to 0. if this condition is true so, it will return 0 otherwise it will go to else block in else block it will assign value in variable arr[num-1] that is "0" and return arr value.

4 0
4 years ago
Circular errors are caused by adding the cell name of _______ cell to its own formula.
Sati [7]

Circular errors are caused by adding the cell name of the active cell to its own formula.

8 0
3 years ago
Which is an example of emoticon use?
Elina [12.6K]
I think it’d be answer B
(I do psychology and it’s kind of similar to this)
8 0
3 years ago
HELP ASAP!!!
Crazy boy [7]
The answer is a C..ur welcome
5 0
4 years ago
Write a program that checks whether a positive number given by an input from the user is greater than 5 and less than 20 with ja
Alona [7]

Answer:

Program written in Java is as follows

See comments for explanations

import java.util.Scanner;

public class CheckRange {

public static void main (String [] args)

{

// This line allows the program accept user input

Scanner input = new Scanner(System.in);

//This line declares variable for user input

int num;

//This line prompts user for input

System.out.print("Number: ");

//This line gets user input

num = input.nextInt();

/* The following if statement checks if the user input is greater than 5 and less than 20 */

if (num > 5 && num <= 20)

{

/* This line is executed if the above condition is true */

System.out.print(num+" is greater than 5 and less than 20");

}

else

{

/*If the condition is not true, this line is executed*/

System.out.print(num+" is not within specified range");

}

// The if condition ends here

}

}

5 0
4 years ago
Other questions:
  • How long does it take 2 consultants to create a slide deck of 120 slides, assuming one consultant make 2 slides per hour?
    8·1 answer
  • Web design people please help!
    7·1 answer
  • Pam is using the Outline view in PowerPoint. She would like to reposition
    13·1 answer
  • What is looping in QBASIC​
    9·1 answer
  • Sue needs to add a header and a footer to a presentation. Which process should she use to do this?
    10·2 answers
  • Annalise received financial aid offers from two universities. Financial Analysis for Option A Costs per Year Financial Aid Packa
    8·2 answers
  • LILLE VIC LUNCUL ANCI.
    5·1 answer
  • How many characters should a strong password have? four six eight ten
    10·2 answers
  • Write the Flowchart to find Even number between 1 to 50<br>​
    9·1 answer
  • What is computer???<br>A. Electornic device<br>B. Storage<br>C. Accuarcy.<br>D. Communciation​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!