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
Who invent cars and who invent bikes and who invent pc
julia-pushkina [17]

Answer:

  • Cars were invented in 1886 by Karl Benz.
  • The term bicycle was coined in France in the 1860s, but The first verifiable claim for a practically used bicycle belongs to German Baron Karl von Drais in 1817
  • The first computer was by Charles Babbage, an English mechanical engineer and polymath he originated the concept of a programmable computer.

7 0
3 years ago
Which two benefits can be expected from KCS adoption if universal Containers wants to implement best practices for its customer
drek231 [11]

Answer:

B. A knowledge article life cycle that evolves based on usage and demand.

Explanation:

As new information is gathered on the product and the type of issues that customers encounters, the knowledge article can be updated to inform the customer on how to handle their problem.

3 0
4 years ago
Lydia is trying to take an aerial shot from the window of an airplane. Where should she hold her camera to get the best shot?
IrinaVladis [17]
Inside The window inside the house
8 0
3 years ago
PLEASE I NEED HELP WITH THIS I WILL GIVE BRAINLIST!!!!!
Neko [114]
It would be so you like chocolate because there is only two options. Yes or no
8 0
3 years ago
Read 2 more answers
A _______ is the most commonly used input device.
nirvana33 [79]
The answer is B.Keyboard
4 0
3 years ago
Read 2 more answers
Other questions:
  • You create hidden form fields with the ____ element.
    9·1 answer
  • Which button is used to set up the pen color?
    9·2 answers
  • Six external parts or periphersal of a computer system
    7·1 answer
  • In a company you are in charge of system maintainance. Justify with 5 reasons why your role is key
    6·1 answer
  • IPv6 is being developed in order to:
    15·1 answer
  • The Quick Access tool bar allows you to customize the actions or commands you frequently use.
    13·1 answer
  • In 5-10 sentences, describe the procedure for responding to an e-mail message.
    5·1 answer
  • SYSTEMY INFORMATYCZNE: Archiwizacja i kompresja zbiorów systemu Linu
    8·1 answer
  • What are the steps to view two different versions of the same document at once? 1. Go to the File tab on the ribbon. 2. Select T
    6·1 answer
  • When using the red / yellow I green method to present status of a project, green can mean which of the following?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!