for(intj=2;j=n;jt+) e=list[j];i=j-1; while (e.GetKey()<list[i].GetKey()) {1ist[i+1]=1ist[i];i--;} 1ist[i+1]=e;}) k0] k(1] k2] k[3] k4] K5] j 8 7 2 4 6 2 -0 [8] 7 2 4 6 3 -0 [7 8] 2 4 6 4 -0 [2 7 8] 4 6 5 -00 [2 4 7 8] 6 -0 [2 4 6 7 8]for ( int j=2;j<=n;j++ ) { e = list[j];i = j–1; while ( e. GetKey( ) < list[i]. GetKey( ) ) { list[i+1] = list[i];i − −;} list[i+1] = e; } } k[0] k[1] k[2] k[3] k[4] k[5] j -∞ 8 7 2 4 6 -∞ [2 4 6 7 8] 2 -∞ [8] 7 2 4 6 4 -∞ [2 7 8] 4 6 3 -∞ [7 8] 2 4 6 5 -∞ [2 4 7 8] 6