The Bee
Description:
Imagine a honeycomb - a field of hexagonal cells with side N
. There is a bee in the top left cell A
. In one move it can crawl one cell down, one cell down-right or one cell up-right (the bee does not crawl up or left).
Write a function that outputs the number of ways the bee can crawl from cell A
to the opposite cell B
.
Input data:
The function receives a single number N - the size of the hexagonal field 2 ≤ N ≤ 200
.
Output data:
The function should output a single integer - the number of ways.
Example:
the_bee(2) --> 11
the_bee(3) --> 291
the_bee(5) --> 259123
Code length limit:
To prevent hardcoding, your code cannot exceed 1 000
characters.
If you have the desire and time, I would be very grateful if you can help in the development of this kata, to translate, or whatever else. I can be contacted via Telegram.
If you want to solve our problems, they are here: From Singularity Hub Community
Similar Kata:
Stats:
Created | Mar 8, 2023 |
Published | Mar 8, 2023 |
Warriors Trained | 2325 |
Total Skips | 72 |
Total Code Submissions | 1851 |
Total Times Completed | 274 |
Python Completions | 152 |
JavaScript Completions | 57 |
C# Completions | 41 |
Haskell Completions | 18 |
Factor Completions | 2 |
Java Completions | 33 |
Total Stars | 109 |
% of votes with a positive feedback rating | 92% of 73 |
Total "Very Satisfied" Votes | 64 |
Total "Somewhat Satisfied" Votes | 6 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 8 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |