6 kyu
Imperfect Fibonacci Rabbits
48 of 75ChristianECooper
Description:
Background
This is an extension of this kata so I suggest you complete that one first.
Imperfect Rabbits
In this kata, our rabbits are sadly imperfect, they only live for a few months, and then they die! As in the previous kata however, our rabbits:
- Take one month to mature.
- Always birth equal numbers of male and female offspring.
- Never have to compete for resources.
- Have no predators.
At the start of the first month you start with one pair of immature rabbits.
Kata
In this kata you must implement the method provided to you with arguments n, b, l
, where:
n
is the number of the months to simulate,b
is the number of pairs each adult pair gives birth to, and,l
is the lifespan in months of a rabbit.
Examples
n = 6, b = 3, l = 6
return 96
n = 8, b = 3, l = 4
return 423
Algorithms
Similar Kata:
Stats:
Created | May 19, 2015 |
Published | May 19, 2015 |
Warriors Trained | 280 |
Total Skips | 79 |
Total Code Submissions | 379 |
Total Times Completed | 75 |
Python Completions | 48 |
Ruby Completions | 15 |
JavaScript Completions | 19 |
Java Completions | 13 |
Total Stars | 11 |
% of votes with a positive feedback rating | 96% of 26 |
Total "Very Satisfied" Votes | 24 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 20 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 3 kyu |
Lowest Assessed Rank | 7 kyu |