Solved


Put m balls into n boxes (again)
According to Cody Problem 1516, if I put 3 balls into 2 boxes then 1 1 1 1 1 2 1 2 2 ...

12 days ago

Solved


Inhomogenous Depth Scale Interpolation
I recently came across a dataset for physical ocean parameters such as temperature and salinity that provided data in the form o...

12 days ago

Solved


Extract leading non-zero digit (★★★★★)
(Copy of Problem 47) Benford's Law states that the distribution of leading digits is not random. This is probably because man...

13 days ago

Solved


Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

13 days ago

Solved


Young's modulus
Given a value of <http://en.wikipedia.org/wiki/Young_modulus Young's modulus> (Y) expressed on MegaPascal, convert it to the uni...

13 days ago

Solved


nanoseconds passed today
Calculate the amount of nanoseconds passed in the current day of a certain date string.

13 days ago

Solved


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

13 days ago

Solved


Given the name from the legend, return the handle
Write a function that will return the handle to the desired object. The input for this function will be a string which represent...

13 days ago

Solved


Zigzag of square matrix
find zigzag of square matrix in one dimension array a=[1 2 3;4 5 6;7 8 9]; should return b= [1 2 4 7 5 3 6 8 9]

13 days ago

Solved


Order of things - 1
Let's assume you have a number of calculations to perform, that depend on each other. E.g. 'A' can be calculated, once the outco...

13 days ago

Solved


Steal, Share, or Catch
You, I, and a few other characters are going to play a game of *Steal, Share or Catch*. We are going to play it 10,000 times vs...

13 days ago

Solved


Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that include the four bas...

13 days ago

Solved


Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

14 days ago

Solved


Fill a zeros matrix (★★★★★)
(Copy of Problem 830) The aim is to fill an array of all zeros given a numerical value and the index of row and columns for t...

14 days ago

Solved


Orthogonal Circles
Check whether two given circles are orthogonal or not. Two circles are orthogonal if they create a right angle at their inter...

14 days ago

Solved


Toads and Frogs Puzzle 2
On a two-dimensional board with 2n + 1 rows and 2n + 1 columns, all (2n + 1)^2 positions of the board, except the central one, a...

14 days ago

Solved


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

14 days ago

Solved


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

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

14 days ago

Solved


I want eval
A valid MATLAB statement containing a definition of a vector is passed as a string S. Determine the length of the vector. Inp...

14 days ago

Solved


Create a vector of n alternating ones and zeros (★★)
Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

14 days ago

Solved


i was a mistake

14 days ago

Solved


Three grind is shipsstraigt
A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

14 days ago

Solved


Find the remainder - 01
Given an array of integers, find the remainder when the product of all the elements is divided by N

14 days ago

Solved


GJam: 2013 Rd1a Bullseye Painting
<http://code.google.com/codejam/contests.html Google Code Jam> 2013 Round 1a Bullseye challenge is to determine how many full ri...

14 days ago

Solved


String Logic 17
Examples: 'DIG' --> 'GDI' 'IMPORTANT' --> 'TANTIMPOR' 'DEAL' --> 'EALD' 'LIMB' --> 'IMBL' 'MOSTLY' --> 'YMOSTL'

14 days ago

Solved


Create a Cell array of month-end date strings within a provided date range
This is a variation of <http://www.mathworks.com/matlabcentral/cody/problems/1039-get-an-array-of-month-ends-in-a-date-range Get...

14 days ago

Solved


Easy Sequences 3: Prime 44-number Squares
The positive integers 62 and 238 are related. Their squares (3844 and 56,644) both end in '44'. In fact, 62 and 238 are the 3rd ...

17 days ago

Load more