A résolu


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

environ 12 ans il y a

A résolu


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 ...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


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.

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


Narcissistic problem
How many likes has this problem?

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


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

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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 ...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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...

environ 12 ans il y a

A résolu


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....

environ 12 ans il y a

Charger plus