Write a function to do an insertion sort on a list.

What will be an ideal response?


```
def insertionSort(list):
for i in range(0, len(list)):
j = i
while j>0 and list[j-1] >list[j]:
jVal = list[j]
list[j] = list[j-1]
list[j-1] = jVal
j = j-1
return list
```

Computer Science & Information Technology

You might also like to view...

The template class prefix _______________ specifies that a template is being declared using an argument of type T.

a. template b. template c. template d. template e. template

Computer Science & Information Technology

The __________ is a tier in a three-tier system.

a) client tier b) application logic tier c) data tier d) All of the above.

Computer Science & Information Technology

When you resize a table, the columns and rows are resized ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

IMEI numbers can be used to block a stolen cell phone

Indicate whether the statement is true or false

Computer Science & Information Technology