Black box test cases for insertion procedure
Posted
by AJ
on Stack Overflow
See other posts from Stack Overflow
or by AJ
Published on 2010-04-20T09:08:39Z
Indexed on
2010/04/20
9:43 UTC
Read the original article
Hit count: 257
insertion_procedure (int a[], int p [], int N)
{
int i,j,k;
for (i=0; i<=N; i++) p[i] = i;
for (i=2; i<=N; i++)
{
k = p[i];
j = 1;
while (a[p[j-1]] > a[k]) {p[j] = p[j-1]; j--}
p[j] = k;
}
}
What would be few good test cases for this particular insertion procedure?
© Stack Overflow or respective owner