Array sort && lowest || highest number return.

int recursiveMinimum(vector &vArray)
{
for(size_t i = 1; i < vArray.size(); i++){
int dummy = vArray[i];
unsigned index = i;

for(;(index > 0)&&(vArray[index-1]>dummy);)
{
vArray[index] = vArray[index -1];
index--;
}

vArray[index] = dummy;
}

return vArray[0];
}
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *