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
Brainliest
olya-2409 [2.1K]

Answer:

browsing history

Explanation:

....

6 0
2 years ago
Read 2 more answers
Find the median and mean of the data set below: 29 17 40 12 29
quester [9]

answer:

median: 29

arrange the data in ascending order, and the median is the value in the middle. If there are an even number of values, the median would be the product of the two middle numbers. (12, 17, 29, 29, 40)

mean: 25.4

the mean of a set of numbers is the sum divided by the number of terms.

12 + 17 + 29 + 29 + 40 = 127 / 5 = 25.4

hope this helped!

6 0
2 years ago
22. A<br> allows one computer to input data into another computer.
Katen [24]

Answer:

input device

Explanation:

any hardware device that allows users to enter programs, data, and commands into a computer system

7 0
2 years ago
(a)Ms word is a isa word processing software ,(b)hub provides physical connection between all computers, State true or false​
8090 [49]

Answer:

true

Explanation:

true in answer in the question

8 0
2 years ago
Read 2 more answers
File
Degger [83]

Explanation:

formula should add cells D3:07.

Empanadas & More

1

In cell D9 create a formula that calculates the total after a 10% disco

you need help understanding how to take a percentage off of a total

LINE TOTAL

2 MENU ITEM

3 Empanadas: Buffalo Chicken

4 Empanadas: Braised Short Rib

5 Empanadas: Fig and Goat Cheese

6 Sides: Black beans and rice

7

UNIT PRICE

$2.98

$2.98

$3.75

$1.98

QUANTITY

20

30

25

40

TAX

8

TOTAL

6 0
3 years ago
Other questions:
  • The overall purpose of a food guide is________.
    11·1 answer
  • Write an application named [LastName]_MultiplicationTable and create a method that prompts the user for an integer value, for ex
    11·1 answer
  • Suppose that your application uses a loop that isn't producing the intended results. The best way to analyze what’s going on in
    13·1 answer
  • Which communication technology should you use if you need to connect three offices which are all within 3 miles of each other at
    6·1 answer
  • Which of the following accessories would you use to create a drawing? A. Calculator B. Notepad C. Paint D. WordPad
    14·2 answers
  • Always follow the routine "clean up while in use and clean up before keeping it".
    6·1 answer
  • Please be my friend. my best and only friend isn't talking to me for some reason
    9·2 answers
  • Raul is a 13-year-old teenager interested in taking up photography as a new hobby. His dad wants to buy him a camera for his bir
    13·1 answer
  • Phân tích 5 phương hướng nhiệm vụ phát triển nông -lâm -ngư nghiệp ở nước ta hiện nay
    11·1 answer
  • which one of the following would not normally be found in an organization's information security policy?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!