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
rewona [7]
3 years ago
8

Given an list of N integers, Insertion Sort will, for each element in the list starting from the second element: Compare the ele

ment with the previous element If the previous element is greater than the element in question (EIQ), push the index of the previous element up 1 Repeat step two with the element before the previous element, and so on. Once an element has been reached that is less than the EIQ, stop pushing and insert the EIQ into the spot ahead of this element (or at the beginning of the list, if it is reached instead).

Computers and Technology
1 answer:
Elena L [17]3 years ago
8 0

Answer:

def insSort(arr):

ct=0;

for i in range(1, len(arr)):

key = arr[i]

j = i-1

while j >=0 and key < arr[j] :

arr[j+1] = arr[j]

j -= 1

ct=ct+1;

arr[j+1] = key

return arr,ct;

print(insSort([2,1]))

Output of the program is also attached.

You might be interested in
Which of the following was the most significant impact the NEA had on the performing arts industry? W
Sedaia [141]

Answer:

The NEA’s focus on building new performing arts centers led to an increased production of arts.

5 0
3 years ago
ZigBee is an 802.15.4 specification intended to be simpler to implement, and to operate at lower data rates over unlicensed freq
never [62]

Answer:

True

Explanation:

Solution

ZigBee uses unlicensed frequency bands but operate at slower speed or data rates.

ZigBee: This communication is particular designed for control and sensor networks on IEEE 802.15.4 requirement for wireless personal area networks (WPANs), and it is a outcome from Zigbee alliance.

This communication level defines physical and  (MAC) which is refereed to as the Media Access Control layers to manage many devices at low-data rates.

6 0
3 years ago
Why is haptic feedback important?
ExtremeBDS [4]

\huge\underline{\red{A}\green{n}\blue{s}\purple{w}\pink{e}\orange{r} →}

Haptic feedback is used to engage more of the user's senses to provide a deeper and more immersive experience. Products that offer haptic feedback, such as some game controllers, often provide different kinds of sensations to correspond with different visual and audio stimuli.

Explanation:

<h3>Hope it helps you !!</h3>
7 0
1 year ago
Describe one way that cells use water
antiseptic1488 [7]
In chemical reactions, as a carrier of materials or keeping the temperature of cells from quickly changing.
8 0
3 years ago
The creation of the Internet and smartphones and the rise of e-mail and text messaging have led to ________ in the quantity of l
Triss [41]
Hello!

The answer would be: a decrease.

I hope that this helps you!
8 0
2 years ago
Other questions:
  • (Analyze scores) Write a program that reads an unspecified number of scores and determines how many scores are above or equal to
    10·1 answer
  • Find the area of the regular hexagon below by using the area formula for triangles.
    7·1 answer
  • If the list above is named list1 and is implemented as a list, whatstatement would you use to find the number ofelements?list1.s
    9·1 answer
  • Create a program in c/c++ which accepts user input of a decimal number in the range of 1 -100. Each binary bit of this number wi
    9·1 answer
  • A consumer is the name for:
    6·2 answers
  • Both aliases and functions can be used to store commands that can be executed, but functions can also accept positional paramete
    14·1 answer
  • PLEASE HELP!!!!!!!!!
    8·1 answer
  • What is the name of the option in most presentation applications with which you can modify slide elements?
    7·2 answers
  • A student can improve performance by decreasing
    14·1 answer
  • How is a secure HTTP (HTTPS) different from a non-secured HTTP?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!