Home /
Expert Answers /
Computer Science /
following-algorithm-sorts-a-list-of-numbers-into-numeric-order-and-is-called-insertion-sort-algorit-pa641
(Solved): Following algorithm sorts a list of numbers into numeric order and is called Insertion sort algorit ...
Following algorithm sorts a list of numbers into numeric order and is called Insertion sort algorithm. Input: A list \( X=(x 1, x 2, \ldots, x n) \) of numbers begin for \( k:=1 \) to \( n-1 \) do for \( i:=1 \) to \( n-k \) do if \( x i>x i+1 \) then temp :=xi \( x i:=x i+1 \) \( x i+1:= \) temp end end end