I am not able to access this one, Please help.
I am not able to access this one, Please help
hello @cbcao263
for each loop is not a good choice for this problem.
use simple loop and then using i,i+1 u can access consecutive elements.
Sir Aise try kiya
Ans galt aarha
if logic is incorrect, Please just say logic is incorrect.
lemme try first and I will surely tell you about that.
u need to take care of magnitude
Nopes
u r accessing i+1 so ur last value of i should be size-2, so add -1 at that highlighted part
Usse 4 aarha
u need to add max to ans.
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.