Odd Even Jump || Leetcode || Asked in Google Interview || Improved code

preview_player
Показать описание
You are given an integer array arr. From some starting index, you can make a series of jumps. The 1st, 3rd, 5th, ... jumps in the series are called odd-numbered jumps, and the (2nd, 4th, 6th, ... jumps in the series are called even-numbered jumps. Note that the jumps are numbered, not the indices.
...
Return the number of good starting indices.
Рекомендации по теме
Комментарии
Автор

I think oddindex or evenindex in one of the condition if we have true will have to ++ for the good index count

megha
join shbcf.ru