Learning DP. Awsome example. Thanks!
Anonymous - Feb 3, 2015
Learning DP. Awsome example. Thanks!
Thank you :)
Anonymous - Feb 3, 2015
Learning DP. Awsome example. Thanks!
Thank you :)
shanky - Nov 0, 2014
for(int j=arrIndex/2 ; j < arrIndex;j++)
{
if(array[j]==1)
return j;//this is our index
}
This makes the approach O(n)
Do a regular binary search after finding the cap , with range i/2 to i
Hi Shanky, you are right. That’s what I have done :)