Solved


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

12 years ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

12 years ago

Solved


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

12 years ago

Solved


Geometry: Find Circle given 3 Non-Colinear Points
*This Challenge is to determine the center and radius of a circle given three non-colinear points.* *Input:* Points *Outpu...

12 years ago

Solved


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

12 years ago

Solved


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

12 years ago

Solved


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

12 years ago

Solved


Memory Map File: Access and Update
Challenge is to read data from a memory map file and also update the file. Memory Mapping allows placing large static arrays ...

12 years ago

Solved


Find and replace the zero array in a matrix
Find the zero array in the matrix and replace it with average of surrounding (adjacent) arrays. Example: A = 3 ...

12 years ago

Solved


Find the index of nth maximum of a row vector of real numbers
Given a vector of real numbers x, find the index idx of _n_ th maximum value. If nth maximum occurs more than once, return the i...

12 years ago

Solved


Langston's Ant
The <http://en.wikipedia.org/wiki/Langton%27s_ant Langston's Ant> Challenge is to determine the number of Black squares after K ...

12 years ago

Solved


Distances in a circle
A circle (360°) is given and a row of 6 monotonic increasing numbers with the which difference from last to first value is les...

12 years ago

Solved


Blockland
Add a new block to these towers without letting them fall. To add a new block just choose the x-coordinate (between -10 and ...

12 years ago

Solved


surface of parallelogram
Given 2 vectors of each 3 elements, determine the surface of the parallelogram which can be created from these 2 vectors.

12 years ago

Solved


Simple Caesar Cypher - shift encrypt a message given an index number
A Caesar cypher is a simple shift encryption method. Your goal is to create a function that allows a user to input a string and ...

12 years ago

Solved


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

12 years ago

Solved


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

12 years ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

12 years ago

Solved


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

12 years ago

Solved


Vector parallel to plane?
Given the coefficients of the equation which defines a plane as follows: ax+by+cz=d, return a boolean indicating whether the 2n...

12 years ago

Solved


Compression: Encode and Decode
This Challenge is to compress an array created by randi(2^32-1,1000) and then decompress your data file. The first call will ...

12 years ago

Solved


Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

12 years ago

Solved


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

12 years ago

Solved


Greed is good - Simple partition P[n].
Find a simple partition P[n]. E.g. P[10] = 4 + 3 + 2 + 1. # There are many solutions, compute just one set. # Don't repeat ...

12 years ago

Solved


Find my birthday
Given a birth date x, find my age when my birth day will fall on the same day as I was born. So if I was born on Monday, what a...

12 years ago

Solved


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

12 years ago

Solved


Who is the baby and who is the daddy in this family?
Given an array of numbers that shows the characteristcs of all family members, find who is the baby and who is daddy in this fam...

12 years ago

Solved


GJam: 2013 China Event: Cannon Angle
This Challenge is derived from <http://code.google.com/codejam/contest/2933486/dashboard#s=p1 GJam 2013 China Captain Hammer>. T...

12 years ago

Solved


GJam 2013 Veterans: Hedge
This Challenge is derived from <http://code.google.com/codejam/contest/2334486/dashboard Hedgemony>. This is the Large data set ...

12 years ago

Solved


Delete the rows in the middle
We will delete the rows in the middle and keep the first and the last rows. For example if input is [1 2 1 7 1 8 ...

12 years ago

Load more