Resuelto


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

más de 12 años hace

Resuelto


Rotate Matrix Both Direction (45 Degree)
*Matrix (3x3 only) rotation*: 3 inputs: *x* matrix, *n* times and *m* option. output: *y* matrix with *n x 45* degree ...

más de 12 años hace

Resuelto


Reverse within string
If input is a string 'yellow' the output should be 'leywol'. Locate the middle of the string and reverse the first (yel) and sec...

más de 12 años hace

Resuelto


GJam: 2013 Rd1a Bullseye Painting
<http://code.google.com/codejam/contests.html Google Code Jam> 2013 Round 1a Bullseye challenge is to determine how many full ri...

más de 12 años hace

Resuelto


Tax Season ! How much is my salary?
Tax Season! I was employed for a period from x until y in a year and I get pay check of amount z on every alternate Friday of th...

más de 12 años hace

Resuelto


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

más de 12 años hace

Resuelto


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

más de 12 años hace

Resuelto


Homemade: Control Charts
This problem is a simple version of control charts in statistics. Intput consists from 30 or more observations. * Upper limi...

más de 12 años hace

Resuelto


Insert certain elements into a vector.
We start with vector V. Some values W will be inserted into V, at positions U. Say, |V| contains |[1 2 3 4 5]| and |W| is |[0...

más de 12 años hace

Resuelto


GJam 2014 China Rd B: Sudoku Checker
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku>. Large Cas...

más de 12 años hace

Resuelto


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

más de 12 años hace

Resuelto


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

más de 12 años hace

Resuelto


Given a number between 1-365 (a day number in a non leap year) , find what day of what month it is.
For a given number between 1-365 (a day number in a non leap year), you should check which day of which month it is. for exam...

más de 12 años hace

Resuelto


Beads on a Necklace (Convex Hulls)
We may describe a <http://en.wikipedia.org/wiki/Convex_hull convex hull> as a rubber band stretched around a list of points. Som...

más de 12 años hace

Resuelto


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

más de 12 años hace

Resuelto


Find the area of a rectangle if length of the diagonal is given.
if length of a diagnonal in rectangle is 5. Its area is 12.

más de 12 años hace

Resuelto


Mean ignoring NaNs
Define a function that behaves in the same way as mean(x) and mean(x,d) except that it ignores NaNs (unless all of the values be...

más de 12 años hace

Resuelto


Palindrome numbers
Find the palindrome numbers from 1 to n where n is the number entered by the user.

más de 12 años hace

Resuelto


Narcissistic problem
How many likes has this problem?

más de 12 años hace

Resuelto


Integer to boolean
Write a general function that will create the following conversation; Input is a column vector with integers Output is a b...

más de 12 años hace

Resuelto


Fermat's last theorem - again
For a given integer n, express it as a sum of two squares if possible. Return empty matrix otherwise. Solution may not be unique...

más de 12 años hace

Resuelto


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

más de 12 años hace

Resuelto


Back to basics - array operations
Without performing actual arithmetic operations on arrays, return feasibility of operation as true or false. True if given opera...

más de 12 años hace

Resuelto


Check if integer
Given a vector of elements, determine if each element is an integer and return true or false accordingly.

más de 12 años hace

Resuelto


Generalized Fibonacci
The Fibonacci sequence is defined as: Fib(1) = 0 Fib(2) = 1 Fib(N) = Fib(N-1) + Fib(N-2) The Fibonacci sequence ca...

más de 12 años hace

Resuelto


length of string on cylinder
A cylinder H cm high has a circumference of C cm. A string makes exactly N complete turns round the cylinder while its two ends ...

más de 12 años hace

Resuelto


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

más de 12 años hace

Resuelto


SHIFT REGISTER
INPUT IS DECIMAL NUMBER. CONVERT IT INTO A BINARY SEQUENCE. THEN SHIFT THE SEQUENCE BY AN AMOUNT OF GIVEN NUMBER OF BITS. FOR E...

más de 12 años hace

Resuelto


Find the relation
Take x as input and y as output. If x=1 y=3 If x=2 y=14 If x=3 y=39 If x=4 y=84 Based on this relation find giv...

más de 12 años hace

Resuelto


Path calculation with polynomials
Let a vector x be the input to our function. 1. If a value of an input vector element x is lower than 0, set this value to 0....

más de 12 años hace

Cargar más