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 does coding work on computers?
sleet_krkn [62]
Coding works through programming/programs. Programs have different coding languages, and text files. The code within the file is known as the "source CODE" this code is used in different ways, causing for the possibility of separate binary files that computers can directly run. Hope I helped.

5 0
3 years ago
Reading is the process of transferring data, instructions, and information from memory to a storage medium.
maksim [4K]
True, the computer will read from, say, a blu-ray and then transfer it to your RAM to before writing it to your hard drive and then, through the various other wonders of computers, it can be displayed on your monitor.
8 0
3 years ago
Consider a class called Rocket that has a private instance variable called Engine. You are writing a "getter" for the Engine. Us
dusya [7]

Answer:

when user wants duplicate copy of the object

Explanation:

Encapsulation are one of the key foundations of object-oriented programming (OOP). It involves the bundling of data or information with the methods and various techniques which operate on that data.

It can be used in hiding the true values or state of a structured data object that is in a class, preventing unauthorized parties' direct access to them.

The circumstances that can be allowed in returning a reference to the existing Engine is when user wants duplicate copy of the object.

4 0
3 years ago
Any Body have a zoom class goin on<br> i wanna bomb
Norma-Jean [14]

This site is only for education related questions. You should only answer or ask questions. That's what we are here for. Whoever is reading this answer, please spread it to stop people from zooming, hurting others, or just posting non-related to education questions. Thank you.

6 0
2 years ago
A data type consisting of numbers, letters and symbols is a _____.
LekaFEV [45]

Answer:

That's the answer

Hope it helps

#brainliest

#heart

#star

#Carryonlearning

4 0
2 years ago
Other questions:
  • A disk rotates at a rate of 7200 revolutions per minute. Seek operations (i.e., moving the access head to a desired track) take
    6·1 answer
  • List three types of cardinalities for relationships within a relational database.
    9·1 answer
  • The ________ phase in a project involves documenting lessons learned from the project, so that the experience is useful to other
    13·1 answer
  • Need help !!!!!!!!!!!!!!!
    7·1 answer
  • You have stumbled on an unknown civilization while sailing around the world. The people, who call themselves Zebronians, do math
    11·1 answer
  • An ____ is a collection of tools, features, and interfaces that enables users to add, update, manage, access, and analyze the co
    10·1 answer
  • Identify the correct sequence of steps to change the font from Verdana to Arial.
    10·1 answer
  • A customer seeks to buy a new computer for private use at home. The customer primarily needs the computer to use the Microsoft P
    9·1 answer
  • 19 dollar fortnite giftcard who wants it
    15·2 answers
  • How can you remove background noise from a video?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!