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

8 days ago

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

8 days ago

Solved


Find the smallest integer m such that n divides m!
Write a function that takes an integer and finds the smallest integer whose factorial is divisible by . For example, if , then...

8 days ago

Solved


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

8 days ago

Solved


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

8 days ago

Solved


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

8 days ago

Solved


Convert Decimal to Hexavigesimal
NASA (Ned’s Alien-Spying Agency) have made contact with a 13-fingered race from the planet Genai. Naturally, Ned’s shadowy opera...

8 days ago

Solved


Convert Hexavigesimal to Decimal
NASA (Ned’s Alien-Spying Agency) have made contact with a 13-fingered race from the planet Genai. Naturally, Ned’s shadowy opera...

8 days ago

Solved


Easy Sequences 27: Product of Radicals of Integers
The radical of a positive integer is defined as the product of the distinct prime numbers dividing . For example, the distinct ...

8 days ago

Solved


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifm...

8 days ago

Solved


Last non-zero digit
Given a number n, find the last non-zero digit of the factorial of that number. You need to take care of the large values of n....

8 days ago

Solved


Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

8 days ago

Solved


Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

8 days ago

Solved


Pandiagonal Prime Magic Square Verification
Verify if an NxN matrix is a Pandiagonal Prime Magic Square. Required properties: 1) N^2 prime values ( No repeats, 1 ...

8 days ago

Solved


Cell Operator *
Please implement operator * for cell: >> {2,3} * 2 ans = 1×4 cell array [2] [3] [2] [3] >> {2,3} * [2 3]...

8 days ago

Solved


Damping of Servomotors with Tachometer Feedback
In Control Engineering, servomotors with tachometer feedback can be modeled by the second order system K / [J*s^2 + (B + K*K...

8 days ago

Solved


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

8 days ago

Solved


Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

8 days ago

Solved


Convert matrix to 3D array of triangular matrices
Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

8 days ago

Solved


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

9 days ago

Solved


Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! But...

9 days ago

Solved


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

9 days ago

Solved


Pandigital number n°3 (Inspired by Project Euler 32)
After Problem 2319 and 2320. An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For examp...

9 days ago

Solved


Pandigital number n°2 (Inspired by Project Euler 32)
After Problem 2319. An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For example, the 5-...

9 days ago

Solved


Pandigital number n°1 (Inspired by Project Euler 32)
A little warm-up to begin... An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For ex...

9 days ago

Solved


Optimum Egyptian Fractions
Following problem was inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2126-split-bread-like-the-pharaohs-egypt...

9 days ago

Solved


Mean and standard deviation of times in string
Input(t) - cell of strings with times in format 'min:sec.ms' Output([m, s]) - two strings with mean and standard deviation wi...

9 days ago

Solved


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA' Update - Test case...

9 days ago

Solved


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

9 days ago

Solved


ABBREVIATION
Abbreviate the given string. Consider Only Capital Letters. EXAMPLE If input is 'Abbreviation of The Given String' then ou...

9 days ago

Load more