Resuelto


prime to each other
Given two integers n1, n2 greater than 1, find out if they are prime to each other.

más de 10 años hace

Resuelto


Find elements of set A those are not in set B
Given two sets of data A and B. Find elements of A those are not in set B. ...

más de 10 años hace

Resuelto


FInd an Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find an area of polygon enclosed by the ...

más de 10 años hace

Resuelto


How long does it take to run a bath?
Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...

más de 10 años hace

Resuelto


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

más de 10 años hace

Problema


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

más de 10 años hace | 2 | 38 solvers

Resuelto


sparse_matrix
You convert a vector to a sparse matrix. for example *x* =[1 2 3]; output will be *y* = [1 0 0 ...

más de 10 años hace

Resuelto


Determine the full width at half max
Determine the full width at half max of a curve. The full width at half maximum (FWHM) is a parameter which is used for desc...

más de 10 años hace

Resuelto


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A=[1 2 3; 4 5 6; 7 8 ...

más de 10 años hace

Resuelto


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

más de 10 años hace

Resuelto


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

más de 10 años hace

Resuelto


Polynomial Evaluation
Create a routine that takes a list of coefficients of a polynomial in order of increasing powers of x; together with a value of ...

más de 10 años hace

Resuelto


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

más de 10 años hace

Resuelto


UICBioE240 2.8
Convert x number of hours into seconds.

más de 10 años hace

Resuelto


UICBioE240 2.2
Make a 3x4 matrix that contains all ones.

más de 10 años hace

Resuelto


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

más de 10 años hace

Resuelto


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

más de 10 años hace

Resuelto


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

más de 10 años hace

Resuelto


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

más de 10 años hace

Resuelto


Longest Collatz Sequence
Inspired by Projet Euler n°14. The Collatz iterative sequence (See Cody problem n° 2103 and 211) is defined for the set of po...

más de 10 años hace

Resuelto


longest sequence of nans
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

más de 10 años hace

Resuelto


If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

más de 10 años hace

Problema


If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

más de 10 años hace | 1 | 26 solvers

Resuelto


Place numbers
Given two input first input is a matrix which consist of the index numbers of the second input vector. You place the second inpu...

más de 10 años hace

Resuelto


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

más de 10 años hace

Resuelto


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

más de 10 años hace

Resuelto


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

más de 10 años hace

Resuelto


Recursion - Fun
Generate the first k terms in the sequence a(n) define recursively by a(n+1)=p*a(n)+(1+a(n)) with p=0.9 and a(1)=0.5 ...

más de 10 años hace

Resuelto


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

más de 10 años hace

Resuelto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

más de 10 años hace

Cargar más