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
Vinvika [58]
2 years ago
7

1,2,3,4,5,6,7,8,9,10 – Best case - Sorted in ascending order

Computers and Technology
1 answer:
Pepsi [2]2 years ago
5 0

Using the knowledge in computational language in python it is possible to write a code that from a random number draw creates an order of increasing numbers

<h3>Writting the code in python:</h3>

<em>def shellSort(array, n):</em>

<em>    # Rearrange elements at each n/2, n/4, n/8, ... intervals</em>

<em>    interval = n // 2</em>

<em>    while interval > 0:</em>

<em>        for i in range(interval, n):</em>

<em>            temp = array[i]</em>

<em>            j = i</em>

<em>            while j >= interval and array[j - interval] > temp:</em>

<em>                array[j] = array[j - interval]</em>

<em>                j -= interval</em>

<em>            array[j] = temp</em>

<em>        interval //= 2</em>

<em>data = [10,9,8,7,6,5,4,3,2,1]</em>

<em>size = len(data)</em>

<em>shellSort(data, size)</em>

<em>print('Sorted Array in Ascending Order:')</em>

<em>print(data)</em>

See more about python at brainly.com/question/18502436

#SPJ1

You might be interested in
The type of line shown below represents an / a:​
VikaD [51]

Answer:

esrfsrtg

Explanation:

6 0
3 years ago
Quality answers will be appriciated! :)​
Naddika [18.5K]
<h2>1.</h2>

  1. F
  2. T
  3. T
  4. T
  5. F
  6. F
  7. T

________

<h2>2.</h2>

  1. A
  2. B
  3. D5*E5
  4. A

6 0
3 years ago
Read 2 more answers
Film’s importance in today’s economy?
RSB [31]

Answer:

When a movie or television show shoots on location, it brings jobs, revenue, and related infrastructure development, providing an immediate boost to the local economy. ... The film and television industry supports 2.5 million jobs, pays out $188 billion in total wages, and comprises over 93,000 businesses.

Explanation:

<em>The film industry is estimated to be worth of billions of dollars. Various kinds of people are employed to work as actors, actresses, cameramen, producers, directors, managers and company representatives. It also provides secondary jobs for persons as props, costume designers, caterers, sound, lighting and electronics.</em>

8 0
3 years ago
What is the deference between touch screen phone and keypad phone
Mazyrski [523]
zzzzzzzzzkzkskdxjjeisiwis
8 0
3 years ago
Please help with coding assignment.
Inessa05 [86]

Answer:

import java.util.Random;

class Main {

   

   public int stopAtFive (int j) {

      Random rand = new Random();

      int number = 0;

      for(int i=0; i<j; i++) {

          number = rand.nextInt(9)+1;

          System.out.println(number);

          if (number == 5) {

              System.out.println();

              break;

          }

      }

      return number;

   }

   

   public static void main(String args[]) {

       Main main = new Main();

       main.stopAtFive(20);

       main.stopAtFive(20);

   }

}

Explanation:

Your requirements do not say what has to be displayed or returned from the method, but you can use this as a starting point.

4 0
3 years ago
Other questions:
  • ____ are specially denoted text or graphics on a web page, that, when clicked, open a web page containing related content.
    13·1 answer
  • A ___________ is used when an extra digit is added to a coded field to make sure it the entered data is correct (like social sec
    14·1 answer
  • Which practice represents the trait of effective communication?
    6·2 answers
  • A network administrator wants to increase the speed and fault tolerance of a connection between two network switches. To achieve
    9·2 answers
  • Which of the following are screen objects used to maintain, view, and print data from a database
    9·1 answer
  • Consider a Rational class designed to represent rational numbers as a pair of ints, along with methods reduce (to reduce the rat
    10·1 answer
  • At one college, the tuition for a full-time student is $6,000 per semester. It has been announced that the tuition will increase
    7·1 answer
  • A pointer can be used as a function argument, giving the function access to the original argument.
    8·1 answer
  • 5. What are some situations where you might find it useful to use the “!” symbol in a program?
    9·2 answers
  • What are some industries of aerodynamics and hydrodynamics? explain each one in detail.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!