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

9 days ago

Solved

Break it up! Break it up!

You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

9 days ago

Solved

Number of paths on a 3d grid

This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

12 days ago

Solved

Number of paths on a grid

Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

12 days ago

Solved

Path of least resistance - Move all direction

Extension of the wonderful <https://www.mathworks.com/matlabcentral/cody/problems/1049-path-of-least-resistance Problem 1049> (P...

12 days ago

Solved

Path of least resistance

Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

12 days ago

Solved

Project Euler: Problem 18, Maximum path sum I

By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

12 days ago

Solved

Find the path through the cell

A list of cells is given. Return true if the elements of the list increase monotonically (each element is strictly larger tha...

12 days ago

Solved

Yet Another Path Finder

Assume there is a rectangular grid of points. These points are indicated by linear indices in a MATLAB-fashion. Some of the grid...

12 days ago

Solved

possible ways through matrix

This problem is inspired from problem 2405 <https://www.mathworks.com/matlabcentral/cody/problems/2405-the-number-of-ways>. C...

12 days ago

Solved

The Number of Ways

Find all the possible ways to reach the end of a matrix. So given [a b c d] the possible ways [a c],[a d],[b c],[b ...

12 days ago

Solved

How many rectangles in a grid ?

How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

12 days ago

Solved

Which way to go?

Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

12 days ago

Solved

Mastermind

We are playing the boardgame mastermind <https://en.wikipedia.org/wiki/Mastermind_(board_game)>. The game master has created a 4...

14 days ago

Solved

Rumis Scorer 4

This problem is very similar to <https://www.mathworks.com/matlabcentral/cody/problems/3101-rumis-scorer-3 Rumis Scorer 3>. The ...

15 days ago

Solved

Rumis Scorer 3

<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

15 days ago

Solved

Rumis Scorer 2

<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

15 days ago

Solved

Rumis Scorer 1

<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

15 days ago

Solved

Determine the Result of a Move in Reversi

Note: This is closely related to <http://www.mathworks.com/matlabcentral/cody/problems/2538-find-the-next-legal-move-in-reversi ...

15 days ago

Solved

Find the Next Legal Move in Reversi

<http://en.wikipedia.org/wiki/Reversi Reversi>, also known as Othello, is a game in which reversible white/black chips are place...

29 days ago

Solved

Mastermind V: Optimal Solver - average number of guesses

The following description contains a copy of Richard Zapor's <https://www.mathworks.com/matlabcentral/cody/problems/44239-master...

1 month ago

Solved

Mastermind I: Solve all 1296 cases

<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

1 month ago

Solved

Mastermind II: Solve in 8 or less

<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

1 month ago

Solved

Mastermind III: Solve in 1

<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

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

1 month ago

Solved

Connect 4 (the boardgame)

You are playing the popular game "Connect 4" ( <https://en.wikipedia.org/wiki/Connect_Four>) against Matlab. Luckily, Matlab isn...

1 month ago

Solved

Mastermind IV: Optimal Solver - max of 5 guesses

<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

1 month ago

Solved

Valid Chess Moves

Using <http://en.wikipedia.org/wiki/Algebraic_chess_notation standard Algebraic notation> ('' for a pawn), given previous move a...

1 month ago

Solved

hanoi towers II

with 3 rods (1,2 & 3), the goal is to move a tower of n disks from rod #1 to rod #3. You can move disks only one by one, on the...

1 month ago

Solved

RISK Calculator - Large Armies, High Accuracy, Fast

This Challenge is to quickly provide the high precision probability of legal RISK battles up to 100 vs 100. [ Attack >= 2 and D...

1 month ago