🎯
Focusing
Pinned Loading
-
JumpsCount with Caching
JumpsCount with Caching 1func getAverageNumberOfStepsWithCache(_ n: Int) -> Int {
2var totalSum = 0
3//Holds the intermediate values that we compute.
4var countCache: [Int:Int] = [1:0]
5for i in 1..<n {
-
-
-
-
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.