Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions exercises/fibonacci/canonical-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"exercise": "fibonacci-suite",
"cases": [
{
"uuid": "17146bd5-2e80-4557-ab4c-05632b6b0d01",
"description": "Starting point 0",
"property": "",
"input": {
"number": 0
},
"expected": 0
},
{
"uuid": "5a02fd08-d336-4607-8006-246fe6fa9fb1",
"description": "starting point 1",
"property": "",
"input": {
"number": 1
},
"expected": [1]
},
{
"uuid": "5a02fd08-d336-4607-8006-246fe6fa9fb3",
"description": "number 3",
"property": "",
"input": {
"number": 3
},
"expected": [2]
},
{
"uuid": "5a02fd08-d336-4607-8006-246fe6fa9fb5",
"description": "number 5",
"property": "",
"input": {
"number": 5
},
"expected": [5]
},
{
"uuid": "5a02fd08-d336-4607-8006-246fe6fa9fb2",
"description": "number 20",
"property": "",
"input": {
"number": 20
},
"expected": [6765]
}

]
}
6 changes: 6 additions & 0 deletions exercises/fibonacci/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Description

Write a function to get the n'th Fibonacci number, The first number of the pattern is 0, the second number is 1, and each number after that is equal to adding the two numbers right before it together.

Check failure on line 3 in exercises/fibonacci/description.md

View workflow job for this annotation

GitHub Actions / Lint markdown files

Trailing spaces

exercises/fibonacci/description.md:3:201 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
F0 =0, F1 =1, F2 =1, F3 = 2...
(https://simple.wikipedia.org/wiki/Fibonacci_number)

Check failure on line 5 in exercises/fibonacci/description.md

View workflow job for this annotation

GitHub Actions / Lint markdown files

Bare URL used

exercises/fibonacci/description.md:5:2 MD034/no-bare-urls Bare URL used [Context: "https://simple.wikipedia.org/w..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md
Hint: Think recursively!

Check failure on line 6 in exercises/fibonacci/description.md

View workflow job for this annotation

GitHub Actions / Lint markdown files

Files should end with a single newline character

exercises/fibonacci/description.md:6:24 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
4 changes: 4 additions & 0 deletions exercises/fibonacci/metadata.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title = "Fibonacci suite"
blurb = "Fibonacci suite is based on the sum of the previos two Fibonacci numbers"
source = "Inspired by the exercise in scala red book"
source_url = "https://simple.wikipedia.org/wiki/Fibonacci_number"
Loading