Gelöst


Kelvin to Celsius
Degrees Celsius = degrees Kelvin - 273.15. Given a temperature in Kelvin, return the equivalent temperature in Celsius.

mehr als 5 Jahre vor

Gelöst


Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

mehr als 5 Jahre vor

Gelöst


Sort accordingly

mehr als 5 Jahre vor

Gelöst


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

mehr als 5 Jahre vor

Gelöst


Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

mehr als 5 Jahre vor

Gelöst


Determine the factorial of a number

mehr als 5 Jahre vor

Gelöst


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

mehr als 5 Jahre vor

Gelöst


Vector LCM
* Find Least Common Multiple of a given vector. * Need general solution as the test suite will be expanded. * Function Templa...

mehr als 5 Jahre vor

Gelöst


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

mehr als 5 Jahre vor

Gelöst


Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

mehr als 5 Jahre vor

Gelöst


Remnant

mehr als 5 Jahre vor

Gelöst


Insert zeros

mehr als 5 Jahre vor

Gelöst


speed limit alert

mehr als 5 Jahre vor

Gelöst


Swap rows

mehr als 5 Jahre vor

Gelöst


Row avg

mehr als 5 Jahre vor

Gelöst


Card games

mehr als 5 Jahre vor

Gelöst


Diagonal Prod

mehr als 5 Jahre vor

Gelöst


Return multiples of 3

mehr als 5 Jahre vor

Gelöst


Row sum

mehr als 5 Jahre vor

Gelöst


Generalized Laguerre polynomials
Given an integer _n_ &ge; 0 and a scalar _a_, generate the _n_-th <http://en.wikipedia.org/wiki/Laguerre_polynomials#Generalized...

mehr als 5 Jahre vor

Gelöst


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

mehr als 5 Jahre vor

Gelöst


Triangle Numbers (★★)
(copy of problem 5) Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3...

mehr als 5 Jahre vor

Gelöst


Element-wise vector product (★)
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

mehr als 5 Jahre vor

Gelöst


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

mehr als 5 Jahre vor

Gelöst


Create a vector of n alternating ones and zeros (★★)
Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

mehr als 5 Jahre vor

Gelöst


Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if x = 172...

mehr als 5 Jahre vor

Gelöst


Doubling elements in a vector (★★)
(copy of prob. 1024) Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] t...

mehr als 5 Jahre vor

Gelöst


Median computation (★)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

mehr als 5 Jahre vor

Gelöst


Sum of elements of a vector (★★★)
Given any vector x = [x1, x2, x3, ... xn], compute the sum of its elements. Thus, if x = [ 1 3 -2 5 ], then the sum of its el...

mehr als 5 Jahre vor

Gelöst


Generate n equally spaced "intervals" between -x and x (★)
Given n and x, return a list of numbers (in ascending order) that divides the interval [-x x] into n equal-length intervals. ...

mehr als 5 Jahre vor

Mehr laden