This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.CodeDom.Compiler; | |
| using System.Collections.Generic; | |
| using System.Collections; | |
| using System.ComponentModel; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.Globalization; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Runtime.Serialization; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static int jumpingOnClouds(int[] c) | |
| { | |
| // Shortest route to get to the end | |
| // 0 is safe, 1 is a hazard (avoid) | |
| // each clound is numbered by it's index | |
| // save players current location | |
| // track jumps taken -- DOne, easy, get on my level | |
| // number of next position | |
| var jumpsTaken = 0; |
NewerOlder