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
Elena-2011 [213]
2 years ago
11

Evaluating sorts given the following array: 41, 32, 5, 8, 7, 50, 11 show what the array looks like after the first swap of a bub

ble sort in a scending order.
Computers and Technology
1 answer:
irga5000 [103]2 years ago
8 0

The way that  the array will looks like after the first swap of a bubble sort in ascending order is   {5,32,41, 8,7,50,11}.

<h3>Who do you Write sort code in JAVA?</h3>

It will be:

class SSort

{

  void sort(int array[])

  {

      int n = array.length;

      for (int i = 0; i < 2; i++)

      {

          int minimum_index = i;

          for (int j = i+1; j < n; j++)

              if (array[j] < array[minimum_index])

                  minimum_index = j;

           int temp = array[minimum_index];

          array[minimum_index] = array[i];

          array[i] = temp;

      }

  }

   void printArray(int array[])

  {

      int n = array.length;

      for (int i=0; i<n; ++i)

          System.out.print(array[i]+" ");

      System.out.println();

  }

  public static void main(String args[])

  {

      SSort s = new SSort();

      int array[] = {41, 32, 5, 8, 7, 50, 11};

      s.sort(array);

      System.out.println("After first two iteration of Selection sort:");

      s.printArray(array);

  }

}

Therefore, The way that  the array will looks like after the first swap of a bubble sort in ascending order is   {5,32,41, 8,7,50,11}.

Learn more about array  from

brainly.com/question/26104158

#SPJ1

You might be interested in
How do you take a picture plz answer
Romashka [77]
Hold down Ctrl, Alt, and the button in pointing at for a screenshot to take a picture with the camera. There should be a app on the chrome book in the web store to use.

6 0
3 years ago
Read 2 more answers
Jemma is proofreading a printed copy of her project to provide quality assurance. In which phase would this be categorized?A. Pr
Alex73 [517]

Answer:

C. Post-Production

6 0
3 years ago
Hey there everyone, i have a technology class assignment that is due at the end of this week and it is to get 200 subs on YT...
nirvana33 [79]

Answer:

use a sub bot and don't use to many or u get banned use like a 100

7 0
3 years ago
What processes can move a solute against its concentration gradient?
Rudiy27

Explanation:

To move substances against a concentration or electrochemical gradient, the cell must utilize energy in the form of ATP during active transport. Primary active transport, which is directly dependent on ATP, moves ions across a membrane and creates a difference in charge across that membrane.

7 0
3 years ago
Which of these statements correctly describes how to adjust an image on a slide ?
loris [4]

The correct answer is Choice D.

In order to adjust an image on a slide you can resize it by clicking on the boxes at the corner and then moving it in or out in order to change its size.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Can the police track a phone if you post something on a social media platform even if the SIM card is out and location services
    7·2 answers
  • Which signal types are represented by a continuous waveform?
    10·1 answer
  • Assume that you are able to do an exhaustive search for the key to an encrypted message at the rate of 100 Million trials per se
    12·1 answer
  • Which relationship is possible when two tables share the same primary key? one-to-one one-to-many many-to-one many-to-many
    15·2 answers
  • Marco is ready to create his first slide. He wants to put the title of the
    11·1 answer
  • 15 points
    5·2 answers
  • What the defination of electronics capacitor
    11·1 answer
  • Mention 5 advantages of internet​
    8·1 answer
  • A user purchased a new smart home device with embedded software and connected the device to a home network. The user then regist
    5·1 answer
  • Jacob holds a Computer Hacking Forensic Investigator (CHFI) certification. Which of the following responsibilities should Jacob
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!