A résolu


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

plus de 12 ans il y a

A résolu


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

plus de 12 ans il y a

A résolu


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

plus de 12 ans il y a

A résolu


Positive Infinity
Round the array a towards positive infinity

plus de 12 ans il y a

A résolu


Return the names and values of the input arguments of a function
Given a function name, return the names and values of the input arguments. e.g. function_name(arg1, arg2) is a function de...

plus de 12 ans il y a

A résolu


Wayfinding 1 - crossing
This is the first part of a series of assignments about wayfinding. The final goal is to be able to calculate the fastest route ...

plus de 12 ans il y a

A résolu


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

plus de 12 ans il y a

A résolu


Convert a vector of Integers into a matrix of binaries
Convert a vector of positive integers into a matrix containing their binary representation. Each column of the output contains t...

plus de 12 ans il y a

A résolu


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

plus de 12 ans il y a

A résolu


Order of things - 2
This problem is closely related to <http://www.mathworks.nl/matlabcentral/cody/problems/2189-order-of-things-1 Problem 2189, Ord...

plus de 12 ans il y a

A résolu


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


Polynomial Multiplication
Multiply two polynomial equation.Given polynomial coefficients a and b.

plus de 12 ans il y a

A résolu


GJam 2012 Qualifier: Tongues
This Challenge is a Warm-Up for <http://code.google.com/codejam/schedule.html Google Code Jam 2014> Qualifying round coming up o...

plus de 12 ans il y a

A résolu


Generalized Fibonacci
The Fibonacci sequence is defined as: Fib(1) = 0 Fib(2) = 1 Fib(N) = Fib(N-1) + Fib(N-2) The Fibonacci sequence ca...

plus de 12 ans il y a

A résolu


Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

plus de 12 ans il y a

A résolu


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

plus de 12 ans il y a

A résolu


Minimal cost
A power house, P, is on one bank of a straight river W meters wide, and a factory, F, is on the opposite bank L meters downstr...

plus de 12 ans il y a

A résolu


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

plus de 12 ans il y a

A résolu


Delete the rows in the middle
We will delete the rows in the middle and keep the first and the last rows. For example if input is [1 2 1 7 1 8 ...

plus de 12 ans il y a

A résolu


The 17x17 Problem
This problem is sometimes referred to as the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. See also <http://...

plus de 12 ans il y a

A résolu


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

plus de 12 ans il y a

A résolu


Largest territory
Determine whose territory is largest. If there are two more large territory, determine a smaller number. For example, X ...

plus de 12 ans il y a

A résolu


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

plus de 12 ans il y a

A résolu


reverse string
input='rama' output='amar'

plus de 12 ans il y a

A résolu


Langston's Ant
The <http://en.wikipedia.org/wiki/Langton%27s_ant Langston's Ant> Challenge is to determine the number of Black squares after K ...

plus de 12 ans il y a

A résolu


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

plus de 12 ans il y a

A résolu


Finger Counting
Just counting numbers using fingers. First all my ten fingers are closed. I will say 1 and open my one finger. Likewise for 6...

plus de 12 ans il y a

A résolu


Orthonormal matrix
You decide whether any given matrix is an orthonormal matrix or not. If each column in a matrix is perpendicular to the other...

plus de 12 ans il y a

A résolu


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

plus de 12 ans il y a

Charger plus