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
Complete the body of the decrement static method using only the NaturalNumberKernel methods (multiplyBy10, divideBy10, and isZer
Ivan

Answer:true

Explanation:mark as brainliest

6 0
3 years ago
Digital manufacturing has impacted our world today! List a reasons why.
Maru [420]
Because we can get manufacturing faster than usual
6 0
3 years ago
A customer dictates instruction on how to transcribe audio. Do you have to transcribe the instruction word for word?
Ostrovityanka [42]

Answer:

No

Explanation:

4 0
2 years ago
When computer network are joined together they form a bigger network called the​
Airida [17]

Answer:

A WAN can be one large network or can consist of two or more lans connected together. The Internet is the world's largest wan.

Explanation:

8 0
3 years ago
Which trait depicts honesty?
Aliun [14]

(B) reporting additional cash found in the cash register

5 0
3 years ago
Other questions:
  • What are the planes used to allow SDN to virtualize parts of the physical network so that it can be more quickly and easily reco
    6·1 answer
  • Hub is used in Twisted pair Ethernet. True/False
    6·1 answer
  • Which code fragment constructs an arrray list named players that is initialized to contain the strings "player 1" and "player 2"
    15·1 answer
  • Given the function definition
    12·1 answer
  • An individual who understands and uses a variety of symbols yet uses one symbol at a time to share a message needs more developm
    10·1 answer
  • A research team is studying parallel computing. They want to run parallel process without having to use multiple processors. How
    7·1 answer
  • Which app or website teaches java and phyton
    15·1 answer
  • 12. In cell A14, use the INDEX function and structured references to display the value in the first row and first column of the
    8·1 answer
  • Make a list of five primary raw materials, for each one, indicate and industrial material that is created from it
    10·2 answers
  • Exercise 3.6.9: 24 vs. "24"5 points
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!