answer.
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
NeX [460]
1 year ago
11

Write the state of the elements of each of the following arrays after each pass of the outermost loop of the selection sort algo

rithm has occurred (after each element is selected and moved into place). int[] numbers3 = {8, 5, –9, 14, 0, –1, –7, 3}; int[] numbers4 = {15, 56, 24, 5, 39, –4, 27, 10};
Computers and Technology
1 answer:
My name is Ann [436]1 year ago
4 0

Answer:

The following are the explanation given below.

Explanation:

In the first case => 8, 5, –9, 14, 0, –1, –7, 3.

  • 8, 5, –9, 14, 0, –1, –7, 3 For the first instance, search for the smaller form 1st to 8th as well as move 3rd in the first one.
  • -9, 8, 5, 14, 0, –1, –7, 3 For the second instance, search for the smaller in the second to the 8th and move the last second in the second one.
  • -9, –7, 8, 5, 14, 0, –1, 3 For the third instance, search for the smallest in the third to the 8th and move the last second from the third one.
  • -9, –7, –1, 8, 5, 14, 0, 3 For the fourth instance, search for the smallest in the fourth to the 8th and move the last second from the fourth one.
  • -9, –7, –1, 0, 8, 5, 14, 3 For the fifth instance, search for the smallest in the fifth to the 8th and move the last from the fifth one.
  • -9, –7, –1, 0, 3, 8, 5, 14 For the sixth instance, search for the smallest in the sixth to the 8th and move the last second from the sixth one.
  • -9, –7, –1, 0, 3, 5, 8, 14 are sorted.

In the second case => 15, 56, 24, 5, 39, –4, 27, 10.

  • 15, 56, 24, 5, 39, –4, 27, 10 For the first instance, search for the smaller form 1st to 8th as well as move last 3rd from the first one.
  • -4, 15, 56, 24, 5, 39, 27, 10 For the second instance, search for the smaller in the second to the 8th and move the last fourth in the second one.
  • -4, 5, 15, 56, 24, 39, 27, 10 For the third instance, search for the smallest in the third to the 8th and move the last from the third one.
  • -4, 5, 10, 15, 56, 24, 39, 27 For the fourth instance, search for the smallest in the fourth to the 8th and not move that instance it already sorted.
  • -4, 5, 10, 15, 56, 24, 39, 27 For the fifth instance, search for the smallest in the fifth to the 8th and move the last third from the fifth one.
  • -4, 5, 10, 15, 24, 56, 39, 27 For the sixth instance, search for the smallest in the sixth to the 8th and move the last from the sixth one.
  • -4, 5, 10, 15, 24, 27, 56, 39 For the seventh instance, search for the smallest in the seventh to the 8th and move the last from the seventh one.
  • -4, 5, 10, 15, 24, 27, 39, 56 are sorted.
You might be interested in
Jenny has to include the image of a sun on one of her slides. She needs to write relevant text about it on a dark background on
NISA [10]

blank one: light colored

blank two: bold format??

not sure but here is my best guess

8 0
1 year ago
Define a new object in variable painter that has properties "name" storing "Vincent van Gogh"; "artworks" storing "The Starry Ni
trapecia [35]

Answer:

painter = {'name' : "Vincent van Gogh", 'artworks': ["The Starry Night","Irises","The Potato Eaters"],'bornDate': "March 30, 1853", 'eyeColor': "July 29, 1890", 'diedDate': "July 29, 1890"} #this is a code which holds the questions defined value in a painter variable.

Explanation:

  • The above question wants to declare a variable that is in the form of a key and value pair.
  • The above question states to define name, artworks,eyeColor, and dieddate as a key and the other is defined as a value.
  • when a user wants to access the whole dictionary then he can do with the help of the painter variable.
  • But when he wants to access the value of any particular key, then he can do it with the help of the key name as "painter[keyname]".

6 0
2 years ago
There are two cons to an OLTP database. Which of the following are a solution of these cons?​
Delicious77 [7]

Answer:

The answer is below

Explanation:

An OLTP (Online transaction processing) database is a database that allows for quick transaction processing. It involves inserting, deleting, updating data in the database.

OLTP has many drawbacks like if the system fails, all transactions are going to have problems. Also, since multiple users are allowed to access the data, it makes it prone to hackers.

The solution to the problems associated to the OLTP database is the OLAP (online analytical processing) database.

The OLAP systems allow users to analyze database information from multiple database systems at one time thereby allowing analysis for business decisions.

6 0
2 years ago
Write a program to read-in a sequence of integers from the keyboard using scanf(). Your program will determine (a) the largest i
Natali [406]
It’s not letting me answer it
3 0
1 year ago
Charlie has a large book collection. He was keeping track of it in a spreadsheet, but it has grown big enough that he wants to c
zepelin [54]

Answer:

Check the explanation

Explanation:

Ans 1) storing the data in one single row comes with its own barriers and that is if you delete one of the record in the spreadsheet, all the equivalent records which you didn't wanted to delete would be deleted. For take for instance, if you wish to delete the record of author "James Taylor" then all the books he has written would also be deleted from the spreadsheet.

Ans 2) In 1NF, all row is expected to have only 1 tuple, but here in this spreadsheet the title field for Author "James Taylor" has 2 books, so it would be separated into single rows.

Ans 3) The table in the attached image below doesn't delete with Delete anomaly, i.e., for author "May Norton" if you delete this record, then the only book written by her would be deleted.

So, you have to convert this table into 2NF.

Make separate tables for Author and Book

Author(Author Name, Author Country)

Books(Author Name, Book title, Publisher, Publisher Location, Year, price)

This cannot be normalized any further.

3 0
1 year ago
Other questions:
  • Which data type stores images and audio visual clips?
    15·1 answer
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • Two technicians are discussing lung protection in the shop. Technician A says that respiratory-protection devices can prevent yo
    5·2 answers
  • Carrie works on a help desk and is assigned a ticket that was automatically generated by a server because of an error. The error
    5·1 answer
  • Write an expression that will cause the following code to print "18 or less" if the value of user_age is 18 or less. Write only
    9·2 answers
  • Q3** Write a query to create a new price list for books written by the same author. Allow the user to enter only the first 4 let
    15·1 answer
  • In this code, identify the repeated pattern and replace it with a function called month_days, that receives the name of the mont
    14·1 answer
  • A credit card company receives numerous phone calls throughout the day from customers reporting fraud and billing disputes. Most
    10·1 answer
  • PLEASE HELP!!!
    11·1 answer
  • An online retailer is looking to implement an enterprise platform. Which component of the enterprise platform will help the comp
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!