write a function to sort a list through insertion sorting
python
Answers
Answered by
2
Answer:
Compare the current element in the iteration (say A) with the previous adjacent element to it. ...
Swap the two elements (the current element in the iteration (A) and the previous adjacent element to it).
Compare A with its new previous adjacent element. ...
Swap if they are not in order and repeat steps 3 and 4.
Similar questions