We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
No brother!! This solution is just amazing!!..For the 4th index ... you will reach at 4th index when j=2 and i=2 then apply the logic you will pass the if condition for num[i*j]>num[i]+1..which will set the values at num[i*j] i.e., the 4th index to num[2]+1 which is correct....I hope this helps!!
Down to Zero II
You are viewing a single comment's thread. Return to all comments →
No brother!! This solution is just amazing!!..For the 4th index ... you will reach at 4th index when j=2 and i=2 then apply the logic you will pass the if condition for num[i*j]>num[i]+1..which will set the values at num[i*j] i.e., the 4th index to num[2]+1 which is correct....I hope this helps!!