Solved

Draw a fancy '7' in a zero matrix!

Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this: x = 5, y = 7 7 7 7 7...

2 meses ago

Solved

Caesar Cipher Shift

Given a word and its encrypted version using the caesar cipher, find the shift used.

2 meses ago

Solved

Mix it up!

Given an input string S, return a new string B, that is created by taking one character from the front and then the end iterativ...

2 meses ago

Solved

Monty Python and the Holy Grail: Crossing the Bridge of Death

To cross the Bridge of Death, your function must return the numerical value for the airspeed velocity of an unladen swallow

2 meses ago

Solved

Absolute Value of the Product of Complex Numbers

Find the absolute value (modulus) of the product of two complex numbers given by a + bi and c + di.

3 meses ago

Solved

True engineer

Prove that pi is indeed equal to e. Return 1 by rounding pi and e to the nearest integer then asserting rounded pi and e are eq...

3 meses ago

Solved

Determine if a number is divisible by two

Determine whether the number is divisible by two

3 meses ago

Solved

Find two numbers that add up to the target value

Given a vector A and target n, return the indices of two numbers that add up to n. If there are multiple solutions, return the f...

3 meses ago

Solved

Determine if the number is divisible by 5 or not

Given a number, return true if it is divisble by 5

3 meses ago

Solved

Draw a X

Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

3 meses ago

Solved

Caesar Cipher

Given a input word x and a shift n, encrypt the word with caesar cipher of shift n.

3 meses ago

Solved

Determine whether a number is unprimeable

The number 204 is unprimeable because no single digit can be changed to make it prime. In contrast, the number 207 is not unprim...

3 meses ago

Solved

Find the smallest prime with n inside

Consider the sequence that begins 101, 113, 127, 131, 149, 151, 163,... Not only is every term prime, the th term is the smalles...

3 meses ago

Solved

Mean ignoring NaNs

Define a function that behaves in the same way as mean(x) and mean(x,d) except that it ignores NaNs (unless all of the values be...

3 meses ago

Solved

Cat's paw - 01

lets imagine a cat, standing on an infinitely long row of tiles. since its a 'cat', string length=3; it takes 3 tiles to stand. ...

3 meses ago

Solved

A sequence of Ones

You are given number(s) with all digits - 1. Your answer will depend on the count of 1 in the given number, for example - x1...

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

4 meses ago

Solved

Animated GIF Creator

This Challenge is to execute the Function Template which has a fully functional Animated GIF creator of a shape related to a Zer...

4 meses ago

Solved

Binpack Contest: Retro

The <http://www.mathworks.com/matlabcentral/contest/contests/3/rules Full Binpack Rules and examples>. This Challenge is a re...

4 meses ago

Solved

Weird Diagonal Matrix!!

Given an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n. For example: n=2 z = ...

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

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

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

4 meses ago

Solved

Return the sequence element I

Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one ...

4 meses ago

Solved

Factorizing a number into a given number of factors

Given a positive integer, n, and another positive integer, b, return a matrix, M, of width b, with the following properties: (a)...

4 meses ago

Solved

Vector multiplication

Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

4 meses ago

Solved

Increasing sub-sequence (Level 1)

Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

4 meses ago

Solved

Britney unfolded

You have a long, narrow strip of paper. You are going to fold this strip of paper length-wise in half, than fold the folded stri...

4 meses ago

Solved

Juggler sequence revisited

This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

4 meses ago

Solved

Polygon division

Given the number of vertices (or sides), n, of a planar convex polygon, return the number of ways, w, in which you can divide th...

4 meses ago