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
...
2年弱 前
解決済み
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
...
Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...
2年弱 前
解決済み
Energy of a photon
⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛
Given the frequency F of a photon in giga hertz.
Find energy E of this photon...
2年弱 前
解決済み
Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...
2年弱 前
解決済み
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...
calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter).
You should get pi without using the pi function in M...
2年弱 前
解決済み
Concatenated roots
Which is the value of this infinte concatenated roots?
<<https://s27.postimg.org/i4hkin7xf/Code_Cogs_Eqn.gif>>
Note: If ...
2年弱 前
解決済み
Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...
2年弱 前
解決済み
Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...
2年弱 前
解決済み
Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...
2年弱 前
解決済み
Please check the last row
We have data of matrix, that is input.
That contains 2 or more rows and the last row should contain the average of each column,...