Solved


Fault in our Stars - 01
Create a ladder pattern with n-steps and b-width. For example, For n=2, b=5 -- the ladder would look like - '* ...

5 years ago

Solved


King's Cage
Given the position of the king on the chessboard, determine the minimum number of steps it'll require to reach the destination. ...

5 years ago

Solved


Good Morning :)
Just submit your solution between 05:00:00 and 10:00:00 (AM = Ante Meridiem = Before Noon). _Note : Consider Cody Server Time...

5 years ago

Solved


Pascal's pyramid
In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

5 years ago

Solved


The Tortoise and the Hare - 01
Suppose in an infinitely long line, the hare is standing in position 0. From that place, it can jump either in the +ve direct...

5 years ago

Solved


Bernoulli's Triangle
Generate the bernoulli's triangle upto nth row. <https://mathworld.wolfram.com/BernoulliTriangle.html>

5 years ago

Solved


Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
For example, if n=2 (maximum value), the output matrix should be [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1 1 ...

5 years ago

Solved


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

5 years ago

Solved


BULLSEYE Part 3: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 69s and 0s around the center point. Examples: Input ...

5 years ago

Solved


BULLSEYE Part 2: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

5 years ago

Solved


Abelian Sandpile - 01
Generate a matrix like abelian sandpile where the center of the matrix is n. For example, n=3 out=[0 0 0 0 ...

5 years ago

Solved


Gold Standard
Gold has long been used as currency and a standard for currency, due to its inherent value and rarity. Historical data for gold ...

5 years ago

Solved


Mobius function
From <http://en.wikipedia.org/wiki/Möbius_function wikipedia>: For any positive integer n, define μ(n) as the sum of the prim...

5 years ago

Solved


Not square-free number sequence
<http://oeis.org/A013929 Not square-free numbers> are all positive integers divisible by a square greater than one: 4, 8, 9, 12,...

5 years ago

Solved


Usage of varargout
This Challenge is to demonstrate usage of varargout. Output a cell array using varargout of magic squares of size 1 thru n. ...

5 years ago

Solved


Highly divisible triangular number (inspired by Project Euler 12)
Triangular numbers can be calculated by the sum from 1 to n. For example, the first 10 triangular numbers are: 1, 3, 6, 10, ...

5 years ago

Solved


Better Index Number
Let's say you want to save many, many files and append these files with a certain sortable index number. As you probably know, y...

5 years ago

Solved


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

5 years ago

Solved


Ugly numbers - 01
Ugly numbers are those whose prime factors are 2, 3 or 5. find the nth ugly number.

5 years ago

Solved


Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the el...

5 years ago

Solved


Matrix Indexing
Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

5 years ago

Solved


Compute a sum of Ramanujan
Srinivasa Ramanujan defined the following function: Write a function to compute for various values of . See also Cody Proble...

5 years ago

Solved


Set the Euler-Mascheroni constant with an identity using available MATLAB functions
Cody Problem <https://www.mathworks.com/matlabcentral/cody/problems/42826 42826> asked us to estimate the <https://en.wikipedia....

5 years ago

Solved


Logarithmically spaced vector creation using logspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Use the logspace operator.

5 years ago

Solved


Vector creation using linspace
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use linspace.

5 years ago

Solved


Logarithmically spaced vector creation using linspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Avoid using logspace and use the linsp...

5 years ago

Solved


Vector creation using colon operator
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use the colon (:) operator.

5 years ago

Solved


Right shift an array n times with constant space.
Right shift an array n times with constant space, that is, no extra array can be used. Right shift operation: Last element com...

5 years ago

Solved


Pascal's Equilateral triangle inside a Matrix!!!
Given a number of row 'n', generate the following pascal's matrix 'p' where spaces are filled by 'zeros'. number of row, n = ...

5 years ago

Load more