Solved

Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

4 months ago

Solved

Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

4 months ago

Solved

How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

4 months ago

Solved

Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

4 months ago

Solved

Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

4 months ago

Solved

Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

4 months ago

Solved

Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

4 months ago

Solved

How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

5 months ago

Solved

MinMax
* x=[2 4 3 1 6 4 6] * output , y=[1 6 2 4 3] here,y(1) is the minimum of x, y(2) is the maximum of x, y(3) is the 2nd mini...

5 months ago

Solved

Add two numbers without use of common arithmetic operations. Unfortunately, in order to enforce this restriction, other restrict...

5 months ago

Solved

Mandelbrot Number Test [Real+Imaginary]
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

5 months ago

Solved

Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

5 months ago

Solved

Zero
given an integer a, find the smallest possible integer b(b>0) such that their bitwise logical AND is zero. * if a=11(1011) t...

6 months ago

Solved

leap year
find the number of leap years within the given time interval

6 months ago

Solved

Area-04
The dimension of a rectangle is given. There are two circles of equal size that are inscribed inside it.The circles are tangent ...

6 months ago

Solved

Area-03
There are two circles of equal size are inscribed inside a square. They are tangent to each other. <https://serving.photos.ph...

6 months ago

Solved

Area-02
Given the radius of the circle inscribed in a square, find the area of the square that can be fitted perfectly in the corner. ...

6 months ago

Solved

Area-01
Given the radius of the circle inscribed in a square, find the area that is not bounded by the circle but inside the square. ...

6 months ago

Solved

Project Euler: Problem 11, Largest product in a grid
What is the greatest product of _k_ adjacent numbers in the same direction (up, down, left, right, or diagonally) in a _n×n_ gri...

6 months ago

Solved

Determine if a four bar mechanism is of Grashof type
A four bar mechanism is composed of four links. if s is the smallest link, l the longest and p,q are the length of the other lin...

6 months ago

Solved

Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

6 months ago

Solved

Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

6 months ago

Solved

center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

6 months ago

Solved

Don't be mean. Be nice!
For this problem, you will be given a range of single digits R, and a separate number K. You job is to calculate the mean of al...

6 months ago

Solved

Orthogonal Circles
Check whether two given circles are orthogonal or not. Two circles are orthogonal if they create a right angle at their inter...

6 months ago

Solved

Orthogonal lines
Check whether two given lines are orthogonal or not. Two lines are orthogonal if they create a right angle at their intersect...

6 months ago

Solved

Find the optimal shape to bring the maximum product by a given perimeter
Find the optimal shape (with Nopt sides, where Nopt is at least 3) to bring the maximum product of the sides length, given a spe...

7 months ago

Solved

Combined Ages 2 - Symmetric, n ≥ 3
Following on <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-3 Combined Ages 2>, you wil...

7 months ago

Solved

Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...

7 months ago

Solved

Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.

7 months ago