Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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!

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

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

fast 14 Jahre vor | 6 | 952 Lösungsvorschläge

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Mehr laden