Solved

Count alternating permutations

In an alternating permutation of numbers 1 to n, the numbers are arranged so that they alternately increase and decrease. For ex...

6 months ago

Solved

Fibonacci sequence

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

7 months ago

Solved

Construct the Seidel-Entringer-Arnold triangle

Several problems in Cody ask us to construct part or all of triangles in which entries follow a pattern. Cody Problems <https://...

7 months ago