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
4. WiFi and WiMax are used for a high-speed wireless access technology.
nikdorinn [45]

Answer: Wifi and WiMax are used to create wireless network connections.

Explanation: Wifi and WiMax are used to create wireless network connections. Wifi is used to create small networks and used to connect printers, computers, gaming consoles. WiMax uses spectrum to deliver connection to network. WiMax is used to provide internet services such as Mobile Data and hotspots.

8 0
3 years ago
Complete the sentence.
mojhsa [17]

Answer:

its a network

Explanation:

that is how it is called

7 0
3 years ago
Table Setting in any occasion can add to the beauty and significance of the event. It may
Rudiy27

Answer:

HMMMM IM THINKING HMMMMM

Explanation:

7 0
3 years ago
How to fix this.. facing this problem to upload logo
AlekseyPX
I use an app called codechecker that helps with me having issues like that cause 99% of the time I'll mess it up.
7 0
3 years ago
Question # 18
borishaifa [10]

Answer:what qustoin

Explanation:sorry wala yung tanong

6 0
3 years ago
Other questions:
  • What consist(s) of a series of related instructions that tells the computer what to do and how to do it
    9·1 answer
  • Define a method printAll() for class PetData that prints output as follows with inputs "Fluffy", 5, and 4444. Hint: Make use of
    10·1 answer
  • A circuit contains four resistors connected in series. R1 is 100 , R2 is 200 , R3 is 240 , and R4 is 600 . What is the total cir
    13·1 answer
  • How can I make a video game?
    8·2 answers
  • Which do switches create?<br> Networks<br> Wireless access points<br> Routes<br> Collision domains
    5·1 answer
  • An extract report lists ____________.
    14·1 answer
  • Anyone knows how to do this??
    13·1 answer
  • What are some things that games were historically used for?
    7·1 answer
  • F. Practical Questions
    7·1 answer
  • 2. What is the first part of the 3D printing process ?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!