tomato salad and guacamole

Solved

Capture the flag(s)

Flags are distributed randomly on a large board. Starting from the corner position your goal is to capture as many flags as poss...

3 months ago

Solved

Find the next prime number

Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

3 months ago

Solved

Make a vector of prime numbers

Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

3 months ago

Solved

Find nearest prime number less than input number

Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...

3 months ago

Solved

Circular Primes (based on Project Euler, problem 35)

The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

3 months ago

Solved

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

3 months ago

Solved

Sudoku Solver - Standard 9x9

Solve a Standard 9x9 <http://en.wikipedia.org/wiki/Sudoku Sudoku>. Values 1 thru 9 occur in each row, column, and the nine non-o...

3 months ago

Solved

BLOCK x3 (Version 1)

<https://play.google.com/store/apps/details?id=com.noodlecake.blockblock BLOCK x3> is a simple, fun and relaxing puzzle game. ...

3 months ago

Solved

BLOCK x3 (Version 2)

An extension to problem 2451 ( <https://www.mathworks.com/matlabcentral/cody/problems/2451-block-x3-version-1> ). It is based...

3 months ago

Solved

Toads and Frogs Puzzle 2

On a two-dimensional board with 2n + 1 rows and 2n + 1 columns, all (2n + 1)^2 positions of the board, except the central one, a...

3 months ago

Solved

Win all the time!

This is a 2-players game. One of them is your algorithm. Your algorithm must win in all games. In this game there are 3 rows...

3 months ago

Solved

Toads and Frogs Puzzle

On a one-dimensional board with n + m + 1 cells, there are n counters in the first n cells representing Toads and m counters in ...

3 months ago

Solved

Sokoban: Puzzle 10.45

The <http://www.game-sokoban.com/index.php?mode=level&lid=16138 Sokoban Site> has many puzzles to solve. This Challenge is to s...

3 months ago

Solved

The sliding puzzle: 15

If you are unfamiliar with the sliding puzzle, enter the command _fifteen_ in your MATLAB command window (or search online, of c...

3 months ago

Solved

Sudoku square

We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...

3 months ago

Solved

Check to see if a Sudoku Puzzle is Solved

*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

3 months ago

Solved

PONG 002: Rectangle, Interactive Download, Easier Play

Variation of the Original Classic PONG game brought to Cody. PONG 002 is a rectangular board (2000,1000) with slower initial ve...

4 months ago

Solved

PONG 003: 3-Ball Rectangle, Interactive Download

Variation of the Original Classic PONG game brought to Cody. PONG 003 is a rectangular board (2000,1000) with reasonable veloci...

4 months ago

Solved

Can we make a triangle?

Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

4 months ago

Solved

Is the Point in a Triangle?

Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

4 months ago

Solved

Calculate the centroid of a triangle

Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

4 months ago

Solved

Find my daddy long leg (No 's')

Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

4 months ago

Solved

Kurchan 4x4 - Optimal score

Related to Problem 1646, but bigger. Technically, all you need to do for this Cody problem is input a 4x4 matrix containing the...

4 months ago

Solved

What can you get for exactly amount of money(harder)

Inspired by "Problem 42996. what can you get for exactly amount of money" <https://ww2.mathworks.cn/matlabcentral/cody/problems...

4 months ago

Solved

So many choices

For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

4 months ago

Solved

Penny Distribution Machine

A machine consists of a row of boxes. To start, one places N pennies in the leftmost box. The machine then redistributes the pen...

4 months ago

Solved

Penny Flipping: Reverse subsets of a sequence of coins until you recover the original configuration

The original Penny Flipping Problem (PF-1) starts with a stack of N pennies arranged with all the coins heads up. The first oper...

4 months ago

Solved

Sum of combinations

Input: *X = 40*, *Y = [40 20 10 4]* Output: *Z = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 ...

4 months ago

Solved

Recycled Numbers (CodeJam Qualification Round 2012)

Let's say a pair of distinct positive integers ( _n_ , _m_ ) is recycled if you can obtain _m_ by moving some digits from the ...

4 months ago

Solved

Sleeping Queens 1

My youngest daughter received a card game named Sleeping Queens for Christmas this year, and has been playing it nearly non-stop...

4 months ago