Commit 8490914

mo khan <mo.khan@gmail.com>
2020-10-20 19:03:00
Add problem of the day
1 parent 00977df
Changed files (1)
2020
2020/10/20/README.md
@@ -0,0 +1,24 @@
+Starting at index 0, for an element n at index i,
+you are allowed to jump at most n indexes ahead.
+
+Given a list of numbers, find the minimum number of jumps to reach the end of
+the list.
+
+Example:
+
+Input: [3, 2, 5, 1, 1, 9, 3, 4]
+Output: 2
+
+Explanation:
+
+The minimum number of jumps to get to the end of the list is 2:
+   3 -> 5 -> 4
+
+Here's a starting point:
+
+```python
+def jumpToEnd(nums):
+  # Fill this in.
+print jumpToEnd([3, 2, 5, 1, 1, 9, 3, 4])
+# 2
+``