Jumping on the Clouds

Photo by Jason Blackeye on Unsplash
def jumpingOnClouds(c):
jump,i=0,0
while i< n-1:
if i+2< n and c[i+2]==0:
i+=2
jump+=1
elif i+1< n and c[i+1]==0:
i+=1
jump+=1
return jump

--

--

--

Work in progress

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Further Exploration of gRPC

Launch a Static Web Application Infrastructure on AWS using Terraform

UART Transmitter

Python — Virtualenv All Notes

Response Policy Zones in Unbound

EMST Berlin Coding Bootcamp Guide | Career Karma

Building a company around TypeScript

OpenCV Camera Calibration

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Parag Naik

Parag Naik

Work in progress

More from Medium

How to Become a Data-Driven Enterprise

Data, Analytics, and Execution — Lessons from the Line

The “V” Not for Vendetta but Big Data

Do you know the physical location of your data?

Do you know the physical location of your data?