Why was ( i+1)th position only considered when i is odd and not when i is even? isn’t the value in (i+1)th position always greater than the other options for ith position irrespective of i is even or odd?
Cell mitosis logic
Hi @akr18,
consider n=7 and u want to achieve n=1, if we dont consider i+1 here, sequence of steps will be 7->6->3->2->1.
But if we consider i+1,seq. will become 8->4>2->1 which follows lesser number of steps. So, we should also consider i+1 position when i is odd, if i is even , i+1 is odd, and its of no use since (i+1)/2 will be = to (i/2).
Hope dis resolves ur doubt.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.