Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...
7 meses hace
Resuelto
Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...
7 meses hace
Resuelto
Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...
7 meses hace
Resuelto
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:
Input...