Solved


Breaking up a chocolate bar
You've got a chocolate bar of size , and you want to break it up into bite-sized () pieces. How many steps are required to do th...

9 months ago

Solved


Usage of java.math : Add, Multiply, Pow
This challenge is an introduction to the wonderful word of java.math that allows unlimited precision calculations. The primary ...

9 months ago

Solved


Dilate a 3d object sampled on a regular grid
3d objects can be described by a set of points on a regular grid in Euclidean space. Given the n x 3 matrix m defining some numb...

9 months ago

Solved


Primes Faster for Large N
This Challenge is to improve the "primes" function for speed. This may be accomplished by fixing memory usage. The Matlab fun...

9 months ago

Solved


Find number patterns in rows of a matrix...
So I think this may be a hard one, may be it was only hard for me! So here is what it is, I will give a matrix, with some numbe...

9 months ago

Solved


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

9 months ago

Solved


Backslang, odds are you used it at some point in time...
So backslang is a language that can be used to communicate in an easy decode code, if people know the rules of decoding it. Wel...

9 months ago

Solved


Classify triangles as acute, obtuse, or right
In an acute triangle, the three interior angles are acute, or smaller than 90 degrees. In an obtuse triangle, one angle is obtus...

9 months ago

Solved


Easy Sequences 12: 50th Prime
Write a function that outputs the th prime after a given number . For example, the th prime after is . NOTE: If itself is pr...

9 months ago

Solved


Easy Sequences 11: Factorial Digits without Trailing Zeros
Here is an easy one... It is not difficult to count the number of digits of the factorial of a given number. For example for 'n...

10 months ago

Solved


Easy Sequences 10: Sum of Cumsums of Fibonacci Sequence
The function F(n) is defined as the set of Fibonacci numbers from the first up to the n-th. S(n) is the result of applying to F,...

10 months ago

Solved


Easy Sequences 9: Faithful Pairs
A "faithful number" is a non-prime number that is one less or one more than some prime number but not both. For example, for num...

10 months ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

10 months ago

Solved


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

10 months ago

Solved


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

10 months ago

Solved


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

10 months ago

Solved


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

10 months ago

Solved


Connect Four: find winning move
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/90-connect-four-win-checker this problem>... <http://en.wik...

10 months ago

Solved


Determine which fields have been modified in a structure
Given two input structures (s1, s2), determine which field values have been modified in s2 compared to s1. Your output should be...

10 months ago

Solved


Compute the antisigma function
The sum of divisors function, or , is the sum of the numbers that divide . The antisigma function is the sum of numbers less tha...

10 months ago

Solved


Identify Reachable Points
Given a vector of 2-D Points and a vector of 2-D Deltas create an array of all Locations that can be reached from the points usi...

10 months ago

Solved


Create different color vectors.
When producing figures with multiple lines on, you often want the lines to all be visible and different colors. Given the need f...

10 months ago

Solved


Leftovers? Again?!
I am thinking of a positive number X. To determine what number I am thinking of, I will give you two 1xN vectors. The first ve...

10 months ago

Solved


BULLSEYE Part 3: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 69s and 0s around the center point. Examples: Input ...

10 months ago

Solved


Create matrix with Gray code
Output "g" should be a matrix of class double, with <http://en.wikipedia.org/wiki/Gray_code Gray reflected binary code>. Inpu...

10 months ago

Solved


Put m balls into n boxes
Can you find all the cases where, if I put 3 balls into 2 boxes the case is 1 1 1 1 1 2 1 ...

10 months ago

Solved


Change the sign
Given a matrix x, return one with each diagonal element replaced by its absolute value and the largest element in absolute value...

10 months ago

Solved


Number of cyles and fixed points in a permutation
A permutation can be constructed from one or more sets of elements in cyclic order. A permutation in a single row vector form ...

10 months ago

Solved


Net Present Value of a Stream of Cash Flows
Calculate the net present value of a future cash flow vector given; future cash flow vector (F) and interest rate (i) assume;...

10 months ago

Solved


Triangular Tiling Dots in a Circle
Return how many <http://en.wikipedia.org/wiki/Triangular_tiling Triangular Tiling> grid points there are inside a circle of radi...

10 months ago

Load more