This one from Hackerrank stumped me for a moment and then I cleared everything I was doing and got it in one try. I think my problem with these is I overthink them too much. Anyways, Emma is jumping on sequentially numbered clouds. She cannot jump on clouds that equal 1 (this threw me off). She needs to get there in the shortest amount of jumps.
Time to help Emma jump some clouds!
I know, you're asking: "But where is the check for the clouds that are equal to 1?" - Well, we aren't checking for them exclusively, instead we're doing the opposite and checking for if the next cloud is equal to zero. If it is, huzzah, move forward and increment.
I don't like this one because it still doesn't make complete sense to me, but it passes all the Hackerrank tests. So I will leave it be. Do you have a better solution to this weird one?