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
Schach [20]
4 years ago
10

Which of the following sorting algorithms is described by this text? "Take the item at index 1 and see if it is in order compare

d to the item at index 0. If it is not, then swap the two items. Next, take the item at index 2 and compare it to the items at the lower indexes. Move items in the lower indexes to a higher one until you find the proper location to place the value so that it is in the correct order. Continue this process with all remaining indexes."
a. insertion sort
b. selection sort
c. merge sort
d. quick sort
e. binary sort
An array of integers is to be sorted from smallest to biggest using a selection sort. Assume the array originally contains the following elements:
11 17 30 8 20 25
What will it look like after the third pass through the for loop?
a. 8 11 17 20 25 30
b. 8 11 17 30 20 25
c. 8 17 30 11 20 25
d. 8 11 17 20 30 25
e. 8 11 30 17 20 25
Computers and Technology
1 answer:
trasher [3.6K]4 years ago
7 0

Answer:

b. selection sort

b. 8 11 17 30 20 25

Explanation:

The options above are the correct answers to the given questions.

Selection sort is a simple comparison-based sorting algorithm.

selection sort. (algorithm) Definition: A sort algorithm that repeatedly searches remaining items to find the least one and moves it to its final location. The run time is Θ(n²), where n is the number of elements. The number of swaps is O(n).

It is this sorting algorithm that will best ne suitable in the given event.

You might be interested in
Is the disk in the C: drive fixable or removable disk
katrin2010 [14]

Answer:

The disk is a removable disk.

8 0
3 years ago
Read 2 more answers
Given these values for the boolean variables x,y, and z:
Mumz [18]

Answer:

1. True.

2. False.

3. True.

4. True.

Explanation:

Remember OR operator (||) gives false when both of it's operands are false. AND Operator (&&) gives false when even one of it's operator is false.

In first part we have  

!(True || False) || True

=!True||True

=False||True

=True

In second part we have.

False && True && True

= False && True

=False.

In Third part

! True || (False || True)

=False || True

=True.

In fourth part

True || True && False

=True|| False

=True.

7 0
3 years ago
Can someone help me with Exercise 7.1.5: Initials on codehs.
Ber [7]

7.1.5 Codehs:

Write a program that gets a string containing a person's first, middle and last names, and then display their first, middle and last initials. For example, if the user enters John William Smith, the program should display J. W. S. [In python]

Answer:

first = input("First name: ")

middle = input("Middle name: ")

last = input("Last name: ")

print(first[0]+". "+middle[0]+". "+last[0]+".")

Explanation:

This line prompts user for first name

first = input("First name: ")

This line prompts user for middle name

middle = input("Middle name: ")

This line prompts user for last name

last = input("Last name: ")

This line prints the name initials

print(first[0]+". "+middle[0]+". "+last[0]+".")

7 0
3 years ago
Social media allows businesses to use which proven marketing principle? Select one: a. Reciprocity b. Social proof c. Authority
riadik2000 [5.3K]

B is the most reasonable one

3 0
3 years ago
Read 2 more answers
Given the multiplication 65535 x 32768, will the result cause overflow on a 32-bit system? Will the result need more than 32 bit
Alex

Answer:

65535 x 32768 =214 7450880

which is in the range of 32 bit unsigned integers, so there will be no overflow and we wont be in a need of more bits than 32 bit.

Explanation:

An overflow error indicates that software attempted to write down data beyond the bounds of memory.

Each program features a section of memory allocated for a stack. The stack is employed to store internal data for the program and is extremely fast and keep track of return addressing. A program may jump to a neighborhood that reads some data from the disk drive, then it returns from that routine to continue processing the info. The stack keeps track of the originating address, and therefore the program uses that for the return. Kind of like leaving breadcrumbs to seek out your way back. The stack features a limited amount of space for storing. If software attempts to access a neighborhood of the stack beyond its limits, an overflow error occurs.

• signed 32-bit integers support the range [-2147483648,2147483647]

• unsigned 32-bit integers support the range [0,4294967295]

And if you go outside this range, even temporarily, you would like to be very careful. Most cases handle the overflow technically and provide you "wraparound" or "modulo" behavior where carry bits outside the range just disappear and you're left with the low-order bits like the precise result.

In computer architecture of 32 bit, memory addresses, or other data units are those who are 32 bits (4 octets) wide. Also, 32-bit CPU and ALU architectures are those who have supported registers, address buses, or data buses of that size. 32-bit microcomputers are computers during which 32-bit microprocessors are the norm.

6 0
3 years ago
Other questions:
  • Define a function begins_with_line that consumes a string and returns a boolean indicating whether the string begins with a dash
    15·1 answer
  • What action makes RAM on your computer disappear?
    12·2 answers
  • How to search for the largest files on my computer vista?
    5·1 answer
  • What happens it the offshore team members are not able to participate in the iteration demo due to time zone/infrastructure issu
    11·1 answer
  • Which value can be entered to cause the following code segment to display the message: "That number is acceptable." int number;
    11·1 answer
  • If you're unsure of what chart to use for a set of data, what feature does Excel include that will help you to decide?
    7·1 answer
  • Create a list with 5 numbers and find the smallest and largest number in the list and also the sum and product of the numbers in
    9·1 answer
  • Determine whether or not the following pairs of predicates are unifiable. If they are, give the most-general unifier and show th
    13·1 answer
  • What is the primary purpose of source code editor features such as keyword hi lighting and auto-completion A.to speed up the cod
    7·1 answer
  • For which input values will the following loop not correctly compute the maximum of the values? 1. Scanner in = new Scanner (Sys
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!