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
zhenek [66]
3 years ago
10

Write a method, public static void selectSort(ArrayList list), which implements a selection sort on the ArrayList of Integer obj

ects list. For example, if the parameter list would be printed as [3, 7, 2, 9, 1, 7] before a call to selectSort, it would be printed as [1, 2, 3, 7, 7, 9] after the method call.
Computers and Technology
1 answer:
Pachacha [2.7K]3 years ago
8 0

Answer:

Explanation:

The following code is written in Java and like asked in the question, it is a function that takes in an ArrayList of Integers as a parameter and uses selection sort to sort the array.

public static void selectSort(ArrayList<Integer> list) {

                       for (int i = 0; i < list.size() - 1; i++)

                       {

                               int index = i;

                               for (int j = i + 1; j < list.size(); j++){

                                       if (list.get(j) < list.get(index)){

                                               index = j;

                                       }

                               }

                               int smallerNumber = list.get(index);

                               list.set(index, list.get(i));

                               list.set(i, smallerNumber);

                       }

               }

You might be interested in
External hard drives typically connect to a computer via an external port (such as a usb or ____ port) or a wireless connection.
Marianna [84]

External hard drives typically connect to a computer via an external port (such as a USB or <u>thunderbolt</u> port) or a wireless connection.

<h3>What is a hard drive?</h3>

A hard drive can be defined as an electro-mechanical, non-volatile data storage device that is made up of magnetic disks (platters) that rotates at high speed.

In Computer technology, all hard drives are commonly installed on computers and other digital service for the storage of digital files and to enable the booting of a computer through its operating system (OS).

<h3>What is a memory?</h3>

A memory can be defined as a terminology that is used to describe the available space on an electronic device that is typically used for the storage of data or any computer related information such as:

  • Images
  • Videos
  • Texts
  • Music
  • Codes
  • Folders

In conclusion, all external hard drives typically connect to a computer through an external port such as a USB, <u>thunderbolt</u> port, or a wireless connection.

Read more on hard drive here: brainly.com/question/26382243

#SPJ1

8 0
1 year ago
How to unsubscribe from Brainly
solong [7]
Access the Settings app.
Tap your name.
Scroll down until you reach the Subscriptions feature.
Tap on Subscriptions.
Locate your Brainly Plus subscription.
Select Cancel Subscription.
Tap Confirm.
3 0
3 years ago
Read 2 more answers
A school principal trying to find out if parents will help buy new playground equipment shows digital leadership by.
ELEN [110]

Answer:

D. is the correct answer!

8 0
4 years ago
Read 2 more answers
What is your F O R T N I T E name
kolbaska11 [484]

Answer:

don't have name, but would be something cool.

Explanation:

poor, have a splendid day.

6 0
3 years ago
Read 2 more answers
Please select all examples of systems using guided media. Group of answer choices ADSL 802.11 Wifi Home Networks Global Position
dusya [7]

Answer:

- ADSL.

- Ethernet Home Networks.

- Fiber Optics.

- Cable Television.

Explanation:

In Computer, Guided media also known as bounded media involves the use of cable such as fibre-optic cables, coaxial cable to transmit data signals from one system device to another.

Examples of systems using guided media are;

- ADSL.

- Ethernet Home Networks.

- Fiber Optics.

- Cable Television.

7 0
4 years ago
Other questions:
  • What is the difference between pulse code modulation and delta modulation? Provide examples.
    11·1 answer
  • How is informatics affecting banking and financial institutions?
    13·1 answer
  • You're the network administrator for a company that has just expanded from one floor to two floors of a large building, and the
    7·1 answer
  • What is the name of the program file that you can enter in the Windows search or Run box to execute Event Viewer? What process i
    12·1 answer
  • Write a formula that would return a TRUE result if the sum of the first five numbers in a column of data are negative
    7·1 answer
  • Hellpppp please I need it!
    15·1 answer
  • Reading (BCK FORM 2C IT 2020-2021)
    12·2 answers
  • (Print distinct numbers) Write a program that reads in integers separated by a space in one line and displays distinct numbers i
    8·1 answer
  • write the definition of a class clock. the class has no constructors and one instance variable of type int called hours.
    12·1 answer
  • What do people in the movie e.t think about the character E.T
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!