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
katovenus [111]
3 years ago
13

Which sort algorithm does the following outline define? for i between 0 and number_used-1 inclusivea. sequential b. non-sequenti

al
Computers and Technology
1 answer:
Kitty [74]3 years ago
4 0

Answer:

The answer is option b. non-sequential.  

Explanation:

The right answer is selection sort algorithm.

Selection sort algorithm:

Selection sort is a simple sorting algorithm.  

This sorting algorithm is divided into two parts:

1. the sorted part at the left end  

2.the unsorted part at the right end.

initially, the sorted part is empty and the unsorted part is the entire list.

The smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array and the process continues.

<u>Algorithm : </u>

Step 1 : Set MIN to location 0 .

Step 2 : Search the minimum element in the list.  

Step 3 : Swap with value at location MIN .

Step 4 : Increment MIN to point to next element.  

Step 5 : Repeat until list is sorted.

Sequential algorithm:

The selection sort algorithm sorts an array by repeatedly finding the minimum element from unsorted part and putting it at the beginning.

<u>Algorithm : </u>

Step 1 : selection Sort(array, size)  

Step 2 :repeat (size - 1) times  

Step 3 : set the first unsorted element as the minimum  

Step 4 : for each of the unsorted elements  

Step 5 : if element < current Minimum  

Step 6 : set element as new minimum  

Step 7 : swap minimum with first unsorted position  

end selection Sort

so, in the end the sort algorithm for I between 0 and number_used-1 inclusive is non sequential.

It is selection sort algorithm  which defines the outline  for i between 0 and number_used-1 inclusive .

You might be interested in
Write a method named quarterstodollars. the method should accept an int argument that is a number of quarters, and return the eq
enyata [817]
 public static void quarterstodollars(String[] args) {    Scanner input = new Scanner(System.in);    System.out.println("Enter number of Quarters:");
    System.out.print("Quarters:");    int Q1 = input.nextInt();
DecimalFormat fmt = new DecimalFormat("$#,###.##");    System.out.println("Total:"+fmt.format(calctotal(Q1)));}public static double calctotal(int Q1) {    double total;    total=(0.25 * Q1);    return (total);}

Hope this helps!
7 0
4 years ago
Read 2 more answers
_________ Code that you write is called primary code, and code that the compiler produces after processing the primary code is c
Kazeer [188]

Answer:

The correct answer for the given question is  "source code"

Explanation:

When you writing a code in any programming language that code is known as  source code.The source code is also known as primary code, when source code is compiles it produce runtime code.

The source code is created by the compiler it can be easily understood by the human being.

for example in c language we write a source code after compilation it produces object code .

5 0
4 years ago
Print even numbers till 50 in python coding.
e-lub [12.9K]

In python, you can use a simple list comprehension to solve this problem.

print([x for x in range(51) if x % 2 == 0])

This code prints all the even numbers from 0 to 50 including 0 and 50.

4 0
3 years ago
If you want smaller tables to fit on a single page?
Vinil7 [7]
Well what i do is i make every thing a little smaller and if that dose not work make it bigger so that it just gos over the bottom of the page
8 0
3 years ago
A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
Vikentia [17]

Answer:

input-year taken 2020

2020 is divisible by 2

output- 2020 is a leap year

3 0
3 years ago
Other questions:
  • Choose the true statement below. a. The content that displays in the browser is contained in the head section. b. The content th
    13·1 answer
  • Describe your microsoft word skills that need to be improved upon the most.<br><br>​
    8·1 answer
  • Design an application that has an array of at least 20 integers. It should call a module that uses the sequential search algorit
    13·1 answer
  • John's Plumbing prides itself on excellent customer service, especially during after-hours service calls. They want to connect w
    11·1 answer
  • What information should you avoid sharing when updating your status?
    14·2 answers
  • In ancient times what did kings and tribals chiefs use to communicate
    10·1 answer
  • Write a program to check if an input is a valid hashtag (starts with #, contains only letters, numbers, and underscore, no space
    6·1 answer
  • 14. Which of the following statements is true? A. The most secure email message authenticity and confidentiality isprovided by s
    11·1 answer
  • Write the pseudocode for this flowchart
    6·1 answer
  • Write a one register parameter procedure that converts an ASCII digit in AL to its corresponding binary value. If AL already con
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!