We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Jumping on the Clouds: Revisited
Jumping on the Clouds: Revisited
Sort by
recency
|
1162 Discussions
|
Please Login in order to post a comment
Jumping on Clouds Function below in python def jumpingOnClouds(c, k): n = len(c) energy = 100 # start with full energy i = 0 # start at the first cloud
return energy
This function iterates through the clouds, adjusts the index based on the jump size k, and updates the energy according to the cloud type.
In a way, this challenge reminds me of editing a complex video sequence using VN Video Editor, where you often loop through clips and apply different effects strategically to enhance the final output.
This is my solution in C# 😉
Answer in javascript