TimeForAChange
BAN USER
Repbelindabest675, Animator at ABC TECH SUPPORT
Hey, my name is Belinda and I completed all my study from New York. And Nowadays I am working as ...
Reppepsyfarely, Front-end Software Engineer at 247quickbookshelp
I am Pepsy , a security supervisor at Edge Services for the last 4 years managing security teams and corporate environments ...
Repamieeriddler, Financial Software Developer at ABC TECH SUPPORT
I am Amiee , a Professional Insurance Agent providing valuable services to consumers in need of insurance coverage. As a part ...
RepHannahWilson, Android Engineer at A9
Hi, I’m Hannah from the USA and I am working as an account manager. I work for a hardware ...
RepDonnaTyler, HR Executive freshers at Bloomberg LP
I am Donna , a travel counselor who advises clients on travel options and tour packages, makes bookings , prepares tickets and ...
Repdevlinadevid, CAD Designer at FeatureCAM
Experienced CAD drafter seeking an advanced architectural position. Interested in culinary arts and currently in a course for making sushi ...
Repnp810929, Product Security Engineer at Absolute Softech Ltd
I am Neesha , a Creative news writer with 3+ years of experience at Audio Visions. Great storytelling skills and a ...
Reproseljannet75, Financial Software Developer at Abs india pvt. ltd.
Je suis jannet , une conseillère en voyages qui conseille les clients sur les options de voyage et les voyages organisés ...
RepNancyDWilliams, abc at ABC TECH SUPPORT
I am NancyDWilliams. I work as a Personnel Administrator at Campbellsville university. I was born in India and currently, I ...
Repharveyoberion, Analyst at AMD
Hi, I am Harvey, from the USA. I am working as a soil scientist. I study soil as a natural ...
Repharrytallh, Web Developer at Realty Depot
I am working as a Web developer . Here I create and maintain websites. Here I handle many responsibilities where I ...
bool findMinMax(int *array, int len, int * min, int * max)
- TimeForAChange April 05, 2013{
int minIndex = 0, maxIndex = 0, curIndex = 0;
if (len > 0)
{
for (; curIndex < len; curIndex++)
{
if (array[curIndex] < array[minIndex])
{ // found a new minimum, so old max isnt valid anymore
minIndex = maxIndex = curIndex;
}
if (array[curIndex] > array[maxIndex])
{ // found new max
maxIndex = curIndex;
}
}
if (minIndex < maxIndex)
{ // return min & max
*min = array[minIndex];
*max = array[maxIndex];
return true;
}
}
return false;
}