Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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.

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


Narcissistic problem
How many likes has this problem?

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Carica altro