Resuelto


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

alrededor de 12 años hace

Problema


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

más de 12 años hace | 4 | 106 solvers

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


Pairwise Euclidean Distance
Given two matrices A,B of dimensions NxK and NxL respectively, calculate the pairwise euclidean distance of all vectors (columns...

más de 12 años hace

Resuelto


Find my birthday
Given a birth date x, find my age when my birth day will fall on the same day as I was born. So if I was born on Monday, what a...

más de 12 años hace

Resuelto


Tax Season ! How much is my salary?
Tax Season! I was employed for a period from x until y in a year and I get pay check of amount z on every alternate Friday of th...

más de 12 años hace

Resuelto


Sum of the pixel values for the blue color
Calculate the sum of the pixel values for the blue color, with a picture as an input. *NOTE:* The picture will be provided as...

más de 12 años hace

Resuelto


Speed of light:Experiment
in 1849, Fizeau set up an experiment to measure the speed of light. The discription of this experiment can be found on wikipedi...

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

más de 12 años hace

Resuelto


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


Reverse within string
If input is a string 'yellow' the output should be 'leywol'. Locate the middle of the string and reverse the first (yel) and sec...

más de 12 años hace

Resuelto


ascii value
let input='a' output=97

más de 12 años hace

Resuelto


execute the declaration in strings and return value
execute the commands in strings and return value input='a=23' output=23

más de 12 años hace

Resuelto


Alternately upper-lower case
Alternately upper-lower case Let s='achyuta' output='AcHyUtA'

más de 12 años hace

Resuelto


most frequent character
Obtain most frequent character Let s='balaram'; output='a';

más de 12 años hace

Resuelto


union without repitition
Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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.

más de 12 años hace

Cargar más