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 i code........​
wlad13 [49]

Explanation:

What code are you talking about?

4 0
2 years ago
Read 2 more answers
Describe the difference between the while loop and the do-while loop.
Karo-lina-s [1.5K]

Answer:

The difference between While loop and Do - While loop are explained below.

Explanation:

  • While loop : It is a looping procedure in which the statements inside the while loop are executed depending on the condition outside the while before starting the loop.
  • If the condition is true then the code inside loop is executed otherwise not.
  • Do - While loop:  It is a looping procedure in which the statements inside the loop get executed and then the condition at the end of the loop is checked.
  • This means even the condition is fails the statements inside the loop are executed once.
  • Do while loop name itself suggests that "do the while and then check the condition".  
7 0
3 years ago
Which statements describe the use of styles in Word? Check all that apply.
algol [13]

Answer:

can be used to make word docments look the same

Explanation:

4 0
3 years ago
Read 2 more answers
Unit testing:_________. A. provides the final certification that the system is ready to be used in a production setting. B. incl
NARA [144]

Answer:

Option (C) is the correct option to the following question.

Explanation:

The following option is correct because the unit testing is the process of testing a single unit of software at a time, which means the testing of each and every program separately.

In simple words, Unit testing a process of testing in which the developer executes the single method or a function, statements or loop in the program of the software to checking is it working fine or not.

7 0
3 years ago
The ACME Online Store offers different preferred customer discounts for customers who are "None", "Bronze", "Silver" and "Gold".
Nookie1986 [14]

Yes, the written program has the correct logic to assign the correct discount for each of the 4 valid values of customer_category

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

This refers to the sequence of instructions that are keyed into a computer to execute user-specific commands.

Hence, we can see that based on the variable customer_category that has a string that is one of these 4 values:

0 for "None"

5 for "Bronze"

10 for "Silver"

20 for "Gold"

The program uses the correct syntax as it gives the correct discount based on the assigned values of the variable customer_category as executed with the syntax above.

Read more about programs here:

brainly.com/question/1538272

#SPJ1

8 0
2 years ago
Other questions:
  • Computer hardware had been designed to run a single operating system and a single app, leaving computers vastly underutilized. o
    15·1 answer
  • A(n) monitoring vulnerability scanner is one that listens in on the network and determines vulnerable versions of both server an
    7·1 answer
  • A(n) is the tool that will help you the most when developing the content you will use in your presentation.
    10·1 answer
  • Look at the four schematic symbols shown in the figure above. Each of the symbols is labeled with a number. Which of the followi
    11·1 answer
  • What attracts attention and adds spatial depth to a two-dimensional design.
    9·1 answer
  • Eun-Joo is working on a circuit board. There is no electrical current flowing through a certain switch on the circuit board.
    9·2 answers
  • Question 5 of 10
    10·1 answer
  • The chain of _____ documents that the evidence was under strict control at all times and no unauthorized person was given the op
    13·1 answer
  • It is possible to create a share that is invisible to users browsing the network simply by appending what character to the end o
    5·1 answer
  • 8) how many nanoseconds does it take for a computer to perform one calculation if it performs 6.7 x 107 calculations per second?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!