The parent function seems to be a bit in-correct. …
Anonymous - Apr 3, 2014
The parent function seems to be a bit in-correct. It should return i/2 if i is even.
parent(i)
{
if(i is even)
return i/2;
else
return floor(i/2);
}
Thanks mate for the correction. I have corrected it.