From 8bac073687d77b873fff330fc47dc8882beba400 Mon Sep 17 00:00:00 2001 From: The Coding Aviator <34807532+thecodingaviator@users.noreply.github.com> Date: Tue, 5 Mar 2019 11:51:56 +0530 Subject: [PATCH] fix(formatting): Zeckendorf challenge | Rosetta code (#35474) * fix(formatting): Zeckendorf challenge | Rosetta code * Update zeckendorf-number-representation.english.md --- ...eckendorf-number-representation.english.md | 30 ++----------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/zeckendorf-number-representation.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/zeckendorf-number-representation.english.md index 1c309a80d9..de5e3d18b3 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/zeckendorf-number-representation.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/zeckendorf-number-representation.english.md @@ -6,36 +6,13 @@ challengeType: 5 ## Description
-

-Just as numbers can be represented in a -positional notation as sums of multiples of the powers of ten (decimal) -or two (binary); all the positive integers can be represented as the sum -of one or zero times the distinct members of the Fibonacci series. -

-

-Recall that the first six distinct Fibonacci -numbers are: 1, 2, 3, 5, 8, 13. The decimal number eleven can -be written as 0*13 + 1*8 + 0*5 + 1*3 + 0*2 + 0*1 or -010100 in positional notation where the columns represent -multiplication by a particular member of the sequence. Leading zeroes are -dropped so that 11 decimal becomes 10100. -

-

-10100 is not the only way to make 11 from the Fibonacci numbers however -0*13 + 1*8 + 0*5 + 0*3 + 1*2 + 1*1 or 010011 would also -represent decimal 11. For a true Zeckendorf number there is the added -restriction that ''no two consecutive Fibonacci numbers can be used'' -which leads to the former unique solution. -

-

- Task: - Write a function that generates and returns an array of first N Zeckendorf numbers in order. -

+Just as numbers can be represented in a positional notation as sums of multiples of the powers of ten (decimal) or two (binary); all the positive integers can be represented as the sum of one or zero times the distinct members of the Fibonacci series. Recall that the first six distinct Fibonacci numbers are: 1, 2, 3, 5, 8, 13. +The decimal number eleven can be written as 0*13 + 1*8 + 0*5 + 1*3 + 0*2 + 0*1 or 010100 in positional notation where the columns represent multiplication by a particular member of the sequence. Leading zeroes are dropped so that 11 decimal becomes 10100. 10100 is not the only way to make 11 from the Fibonacci numbers however 0*13 + 1*8 + 0*5 + 0*3 + 1*2 + 1*1 or 010011 would also represent decimal 11. For a true Zeckendorf number there is the added restriction that no two consecutive Fibonacci numbers can be used which leads to the former unique solution.
## Instructions
- +Write a function that generates and returns an array of the first n Zeckendorf numbers in order.
## Tests @@ -92,7 +69,6 @@ const answer = range(1, 20).map(zeckendorf); ## Solution
- ```js // zeckendorf :: Int -> String function zeckendorf(n) {