Find Min and Max Differences in a Vector
Given an array of integers, return the absolute largest and smallest (non zero) difference between any two numbers in the array....
Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this:
x = 5, y =
7 7 7 7 7...
4年弱 前
解決済み
Distance of Car
If a car is going x miles per hour, how long does it take to get y miles?
Determine if all elements are odd
Given an array, return true if all of the elements are odd.
ex.
x = [3 4 1]
allOdd(x)
ans = false
ex.
x = [3 5 7;
5 9...
Draw a X
Given an input , create a square matrix of zeros with an X of ones.
Ex.
n = 3
drawX(3)
[ 1 0 1
0 1 0
1 0 1 ]
...
4年弱 前
解決済み
Caesar Cipher
Given a input word x and a shift n, encrypt the word with caesar cipher of shift n.
4年弱 前
解決済み
Extract the main diagonal of a matrix
Extract the main diagonal of a matrix and return as an array.
For example, the main diagonal of the following matrix would be:
...