fix(curriculum): external fibonacci word link in CIP (#46435)

* removed the link

* refactor for clearance

* include n back because terms looked weird, will update it later

* Switch term to Term

* linked to Rosetta entropy challenge

* Term before it's last moments

Co-authored-by: Jeremy L Thompson <jeremy@jeremylt.org>

* Swaped term and terms to n and N

* swap sub N to sub n

* Subtle hints

Co-authored-by: Jeremy L Thompson <jeremy@jeremylt.org>

Co-authored-by: Jeremy L Thompson <jeremy@jeremylt.org>
This commit is contained in:
Muhammed Mustafa
2022-06-24 18:48:51 +02:00
committed by GitHub
parent f855671949
commit 465dac008a

View File

@@ -8,7 +8,7 @@ dashedName: fibonacci-word
# --description--
The Fibonacci Word may be created in a manner analogous to the Fibonacci Sequence [as described here](https://hal.archives-ouvertes.fr/docs/00/36/79/72/PDF/The_Fibonacci_word_fractal.pdf):
The Fibonacci Word Sequence may be created in a manner analogous to the Fibonacci Sequence, but it focuses on iterating concatenation.
<pre>Define F_Word<sub>1</sub> as <strong>1</strong>
Define F_Word<sub>2</sub> as <strong>0</strong>
@@ -16,9 +16,11 @@ Form F_Word<sub>3</sub> as F_Word<sub>2</sub> concatenated with F_Word<su
Form F_Word<sub>n</sub> as F_Word<sub>n-1</sub> concatenated with F_word<sub>n-2</sub>
</pre>
Entropy calculation is required in this challenge, [as shown in this Rosetta Code challenge](https://www.freecodecamp.org/learn/coding-interview-prep/rosetta-code/entropy)
# --instructions--
Write a function to return the Fibonacci Words up to `n`. `n` will be provided as a parameter to the function. The function should return an array of objects. The objects should be of the form: `{ N: 1, Length: 1, Entropy: 0, Word: '1' }`. `Entropy` is computed for the string `Word` [as described here](https://en.wikipedia.org/wiki/Entropy_%28information_theory%29) and rounded to 8 decimal digits of accuracy.
Write a function to return the first `n` Fibonacci Words. The number of `n` is provided as a parameter to the function. The function should return an array of objects. The objects should be of the form: `{ N: 1, Length: 1, Entropy: 0, Word: '1' }`. `Entropy` is computed for the string `Word` and rounded to 8 decimal digits of accuracy. Note that the indices of this sequence start at `1`.
# --hints--