Solved


Cluster Partition
Given an array (row or column) of numbers, divide the array into consecutive positive/negative numbers. 0 is to be treated inde...

11 days ago

Solved


Canadian Conundrum
After succesfully completing the French Conundrum, you have decided to take a vacation. Your trip is amongst the mighty mountai...

11 days ago

Solved


French Conundrum
The French army is trapped, sorrounded in backwards direction (South and West directions) by enemy traps and ambushes. You are n...

11 days ago

Solved


Sub-Diagonal Sum
Given a (m x n) matrix and a value r {1,-1}, change every element to the sum of the diagonal led by the element. r=1 > regular ...

11 days ago

Solved


Magical Land
Mother Earth has gifted humanity a magical land to help all life on earth, in the shape of a n-sided regular polygon. You, bein...

11 days ago

Solved


Find the standard deviation of non-zero elements in a matrix
Given a matrix A, calculate the sample standard deviation of only the non-zero elements. If there are fewer than 2 non-zero ...

12 days ago

Solved


Parametric Array
Create a row vector, 1xN (Integer, >1), such that the mean of the vector is M (Real number) and the standard deviation of the ...

15 days ago

Solved


Scorer's Function
Evaluate the Scorer's function for a given input. The expected output is Gi(x). Note - The precision will vary for test cases...

15 days ago

Solved


Local Extrema
Given a 2D (m,n>1) matrix, replace an element if it is not a local extrema (minima/maxima), with 0 (zero). The comparison crite...

15 days ago

Solved


Hyperperfect Numbers
A k-hyperperfect number is a natural number n for which the equality n = 1 + k(σ(n) − n − 1) holds, where σ(n) is the divisor ...

15 days ago

Solved


Leyland Primes
A Leyland Number is defined as a number of the form - x^y + y^x, or, x^y - y^x (x,y)>1 Given an array of numbers(>1), check...

15 days ago

Solved


Factor Digits
Check if a given number in an array of numbers is - Equidigital Number - A number that has the same number of digits as the num...

15 days ago

Solved


Matrix Rotation
You are given a 2D matrix of dimension [m,n] and a positive integer r. You have to rotate the matrix r times and print the resul...

15 days ago

Solved


Truncatable Primes
A truncatable prime is a leading digit is successively removed, then all resulting numbers are prime. Wiki When given a number...

16 days ago

Solved


Secure Password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a pass...

18 days ago

Solved


Electric Potential Energy

18 days ago

Solved


Duplicate/Twins
You have to find if someone is present in 2 lists even if there's one orthographic fault in his name. Consider that an orthograp...

18 days ago

Solved


Primitive Root Modulo n
Given a positive integer n > 2, return a vector, v, of positive integers smaller than n that are primitive roots modulo n. If no...

18 days ago

Solved


Snakes and Ladders: Variable Die
This problem is a sequal to Problem 59132 Snakes and Ladders: Average Number of Turns. Instead of a 6-sided die, your function ...

18 days ago

Solved


Snakes and Ladders: Average Number of Turns
In this problem, you will play a single-player variant of the classic game Snakes and Ladders. The rules are as follows: The pl...

18 days ago

Solved


Minimum number of crossings in a complete bipartite graph
This problem is related to problem 58389. A complete bipartite graph may be drawn in different ways, such that the number of li...

18 days ago

Solved


The Yellowstone Permutation
The Yellowstone Permutation is a sequence of positive integers, defined by the following rules: No term is repeated. Given n t...

18 days ago

Solved


Exact Cover
An efficient solution to the exact cover problem can be useful in many situations. In this problem, you are welcome to use Knuth...

18 days ago

Solved


Find the dividend
Given a vector of pairwise coprime positive integers, p, and a vector of corresponding remainders, r, return a positive integer,...

18 days ago

Solved


Korselt's Criterion
A composite integer n (n>=2) divides b^n-b, i.e. mod(b^n-b,n)==0, for all integers b if and only if n is square-free (doesn't ha...

18 days ago

Solved


Circle Division
A circle can be divided into 2 sections, by placing 2 points in arbitrary locations along its circumference and drawing a straig...

18 days ago

Solved


Mean number of letters per word (Hard)
The previous problem in this series is <https://www.mathworks.com/matlabcentral/cody/problems/44852-mean-number-of-letters-per-w...

18 days ago

Solved


Aztec Diamond domino tilings
Consider a Cartesian grid, with verteces at integer x and y values, where every four vertices around a vacant space define a uni...

18 days ago

Solved


Kurosu solver
This problem is related to <https://www.mathworks.com/matlabcentral/cody/problems/44657-kurosu-checker Problem 44657>. The ga...

18 days ago

Solved


Segmented number sequence
Given a positive integer, n, and a row vector, x, of positive integers, return a row vector, v, which is a sequence of length n ...

18 days ago

Load more