Vincent-kipngeno / mouse-jump-river-quiz3

A mouse is looking over a river that's 21 feet wide. There are 20 stones placed in the river 1 foot apart, such that there is 1 foot from the beginning of the river to the first stone, and 1 foot from the first stone to the next stone, and so on; and 1 foot from the last stone to the end of the river. The mouse can jump over 1 foot or 2 feet such that the first step the mouse can make is either from the beginning of the river to the first stone, or from the beginning of the river to the second stone. If the mouse can't jump backwards, write a Java function that returns the number of different ways the mouse can jump from the beginning of the river to the end of the river.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mouse-jump-river-quiz3

A mouse is looking over a river that's 21 feet wide. There are 20 stones placed in the river 1 foot apart, such that there is 1 foot from the beginning of the river to the first stone, and 1 foot from the first stone to the next stone, and so on; and 1 foot from the last stone to the end of the river. The mouse can jump over 1 foot or 2 feet such that the first step the mouse can make is either from the beginning of the river to the first stone, or from the beginning of the river to the second stone. If the mouse can't jump backwards, write a Java function that returns the number of different ways the mouse can jump from the beginning of the river to the end of the river.

Set-up

  • Used intellij IDEA
  • Git clone the program then,
  • To run: Move to src/main/java directory then run '$ javac App.java && java App' in the terminal

About

A mouse is looking over a river that's 21 feet wide. There are 20 stones placed in the river 1 foot apart, such that there is 1 foot from the beginning of the river to the first stone, and 1 foot from the first stone to the next stone, and so on; and 1 foot from the last stone to the end of the river. The mouse can jump over 1 foot or 2 feet such that the first step the mouse can make is either from the beginning of the river to the first stone, or from the beginning of the river to the second stone. If the mouse can't jump backwards, write a Java function that returns the number of different ways the mouse can jump from the beginning of the river to the end of the river.


Languages

Language:Java 100.0%