Solved


New Cody Time-Out Time
Determine the New Cody Time-Out Time Consume the Maximum Possible Time without Timing out. *Score:* 60 (sec) - Time (sec) ...

14 years ago

Solved


Functionality 1
It's all about functionality. *Cheating is allowed but not required*

14 years ago

Solved


arrangement of symbols
There are n different symbols in which m symbols are identical (m<n). How many different arrangement can we make with these symb...

14 years ago

Solved


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

14 years ago

Solved


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

14 years ago

Solved


Finite Continued Fraction
Given an input real number x and a natural number n, output the row vector with the n first terms of the continued fraction. F...

14 years ago

Solved


Implement Solitaire cipher for N long deck.
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cypher>. Given a starting permutation of numbers [1:...

14 years ago

Solved


AVIRIS Inscribed Rectangle Bit Mask - Speed Test
The AVIRIS data sometimes is provided uncropped. This creates edge regions with values of "-50". Shown is AVIRIS Moffett Field i...

14 years ago

Solved


Fix y_correct : Hack
The Test Suite has an error. Fix the y_correct value. (See the tags for hints)

14 years ago

Solved


Become the leader
The goal of this problem is the same as the goal of the rest of them: *become the leader*. Actually, you can only solve this ...

14 years ago

Solved


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

14 years ago

Solved


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

14 years ago

Solved


Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

14 years ago

Solved


Compute the dilation of a binary image
A basic operation in image analysis is the dilation. Given an image where each pixel is either on or off (black/white, true/fals...

14 years ago

Solved


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

14 years ago

Solved


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

14 years ago

Problem


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

14 years ago | 6 | 954 solvers

Solved


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

14 years ago

Solved


Find files with extension ext in the current directory
List all files with extension 'ext' in the current directory. Return a char matrix with the name of files in rows. Return 0 if...

14 years ago

Solved


Without french accent please !
Suppress french accent For example 'Déjà présent' -> 'Deja present'

14 years ago

Solved


Find the list of all open files
In the test suite, I use <http://www.mathworks.com/help/matlab/ref/fopen.html fopen> to create new files. The task is to find th...

14 years ago

Solved


Community Problem 500!
In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

14 years ago

Solved


Find similar/related functions
The _help_ function can be useful for getting quick assistance on a particular function. For most built-in MATLAB functions, a p...

14 years ago

Solved


Script file size
Determine the file size of a script, "function.m". This is the base scoring method for Cody and the Matlab Contests. A met...

14 years ago

Solved


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

14 years ago

Solved


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

14 years ago

Solved


mathematics , probability problem
How many different result can we have, rolling k dice?

14 years ago

Solved


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

14 years ago

Solved


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

14 years ago

Solved


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

14 years ago

Load more