+ 1

What does it mean????¿

What does the 14 line mean?? https://code.sololearn.com/cWSzDO06egS6/?ref=app

11th Apr 2020, 5:10 PM
shiryaeva
shiryaeva - avatar
5 Antwoorden
+ 2
🤔🤔but it is your own code🤔🤔
11th Apr 2020, 5:13 PM
Oma Falk
Oma Falk - avatar
+ 2
Ok it is a loop from 0 to n-1 but I wrote on your other code a more readable version.
11th Apr 2020, 5:19 PM
Oma Falk
Oma Falk - avatar
0
First, I wrote the code as I saw fit. but for some reason code gave the wrong answer. here in this form, the code returns the correct answer. but I don’t understand why.
11th Apr 2020, 5:17 PM
shiryaeva
shiryaeva - avatar
0
I understand perfectly well that this is a loop from zero to n-1 .... but why exactly with it the program gives the correct answer ..
11th Apr 2020, 5:20 PM
shiryaeva
shiryaeva - avatar
0
'j' previous last value 1, taking it as same. So j=1 there. For input: 3 1 4 2 Is answer 3 is correct? No...
11th Apr 2020, 9:55 PM
Jayakrishna 🇮🇳