Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...
Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55...
3ヶ月 前
解決済み
Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...
3ヶ月 前
解決済み
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...
3ヶ月 前
解決済み
Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...
Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN;
output -> matrix(p*m), the same matrix where we deleted the enti...
4ヶ月 前
解決済み
Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...
Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1.
Example:
Input x = [ 1 2 0 0 0
...
4ヶ月 前
解決済み
Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix
Example
...
4ヶ月 前
解決済み
A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...
4ヶ月 前
解決済み
Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax:
a = zeros(1000,1000);
But when the function ends, I find that I don'...
4ヶ月 前
解決済み
Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...
4ヶ月 前
解決済み
frame of the matrix
Given the matrix M, return M without the external frame.
4ヶ月 前
解決済み
subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.
matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix
[ 1 2 3 ;
4 5 6 ;
7 8 9 ]
the resulting 1-...
4ヶ月 前
解決済み
swap sign sum & multiply castles
It is an easy problem, if you know the answer.
Given a square matrix of NxN ordinary numbers.
Initially place N identical indi...
4ヶ月 前
解決済み
Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix.
For example if a ...