Solved


Addition Partition
You will be given two numbers, N and K. Write a MATLAB function that will determine how many different unique ways you can have...

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

2 years ago

Solved


Mechanics 1
I thought I would make a mechanics problem for all those physics lovers out there. Imagine two solid, rigid spheres B1 and B...

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

2 years ago

Solved


Red and green towers
Frankie has a large number of wooden cubes, painted in red and green. He is building little towers with his cubes, by stacking t...

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

2 years ago

Solved


Lowest sum from a group of digits
Hi there. It's James's daughter here again, and my third grade math teacher is up to her old tricks. This time, she's giving u...

2 years ago

Solved


Create all combinations of vectors
This function exists in the Neural Network Toolbox but is not available in Cody. Can you write such a function? See <http://...

2 years ago

Solved


Kurchan Square - Evaluation Function
Evaluate a Kurchan square. An NxN square with values 1:N^2. Given a square matrix determine the products of each row, column,...

2 years ago

Solved


Highest powers in factorials
This is the inverse of the problem <https://www.mathworks.com/matlabcentral/cody/problems/44747 Exponents in Factorials>. Inste...

2 years ago

Solved


Exponents in Factorials
It's time to get excited about numbers!!! Well, we're just dealing with factorials here, but it's still a good reason to get ex...

2 years ago

Solved


Maximum sum from any 2 numbers with a variable number of inputs
Given a variable number of inputs, combine any 2 numbers from the inputs and output the maximum sum the combinations can generat...

2 years ago

Solved


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

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

2 years ago

Solved


Combine Cards to make 21
Given between two and six cards, e.g. A _ 3 _ 7 _ 6 _ 2 place one of the mathematical symbols (+,-,*,/) in the space betw...

2 years ago

Solved


Poker Series 01: isStraightFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is to...

2 years ago

Solved


Mongean Shuffle : 2
Extension to <https://www.mathworks.com/matlabcentral/cody/problems/2479-mongean-shuffle problem 2479>: Determine the number...

2 years ago

Solved


Mongean Shuffle
A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side. * The top card of the deck is...

2 years ago

Solved


Kurchan 3x3 - Optimal Score
Find an optimal 3x3 Kurchan square, score of 198. A 3x3 Kurchan square has values 1:9.The products of each row, column, diag...

2 years ago

Solved


Kurchan 5x5 - Optimal Score
Related to Problems 1646 and 2650, but bigger. Technically, all you need to do for this Cody problem is input a 5x5 matrix conta...

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

2 years ago

Solved


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

2 years ago

Solved


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

2 years ago

Solved


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

2 years ago

Solved


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

2 years ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

2 years ago

Solved


Divisible by n, Composite Divisors
Pursuant to <http://www.mathworks.com/matlabcentral/cody/problems/42453-divisible-by-n-prime-vs-composite-divisors Divisible by ...

2 years ago

Solved


Divisible by n, Truncated-number Divisors
Some divisors only require a few numbers at the end of the number in question to determine divisibility, no matter how long. Exa...

2 years ago

Solved


Divisible by n, prime divisors from 20 to 200
Pursuant to the previous problem (linked below), this problem requires a function that checks for divisibility of large numbers ...

2 years ago

Solved


Divisible by n, prime divisors - 11, 13, 17, & 19
Divisibility checks against prime numbers can all be accomplished with the same routine, applied recursively, consisting of add ...

2 years ago

Load more