Gelöst


A little bit of luck needed
This one may require a little bit of guess work, but it is possible. Hints: - The same solution might fail the tests once and ...

10 Monate vor

Gelöst


Remove the diagonal of a square matrix
Some Cody problems ask solvers to remove columns (e.g., CP 7), and others ask solvers to remove rows (e.g., CP 44033). Write a...

10 Monate vor

Gelöst


Palindrome vector
Check if a given vector is Palindrome. Example, [1 2 54 32 45 5 33 456 45 456 33 5 45 32 54 2 1]

10 Monate vor

Gelöst


Test x = 1
Write a function to make the variable x = 1

10 Monate vor

Gelöst


Division
Given two numbers a and b divide them a/b

10 Monate vor

Gelöst


Multiplication
Given 2 numbers a and b mulitply them

10 Monate vor

Gelöst


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

10 Monate vor

Gelöst


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

10 Monate vor

Gelöst


Lights Out 2 - 5x5, 4 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

10 Monate vor

Gelöst


Lights Out 1 - 5x5, 3 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

10 Monate vor

Gelöst


Most Frequent Word - 01
Given a document file or a character array, find out the most frequent word in that document. In the case of multiple words -...

11 Monate vor

Gelöst


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

11 Monate vor

Gelöst


You LOVES Matlab 41%
Given two strings, determine the percentage that one loves the other in the following way: YOU LOVES MATLAB there is 1 '...

11 Monate vor

Gelöst


Sleeping Queens 1
My youngest daughter received a card game named Sleeping Queens for Christmas this year, and has been playing it nearly non-stop...

11 Monate vor

Gelöst


Deduce Equations for Simplified Interstellar Doppler Effect ✨
R2-D2 and C-3PO are friends. R2-D2 boards a spacecraft bound to a galaxy far, far away, but is always in contact with C-3PO, als...

11 Monate vor

Gelöst


Mirror, mirror on the wall, who is fairest of them all?
The Elo rating system was featured in the movie *The Social Network* during the <https://www.youtube.com/watch?v=BzZRr4KV59I/ al...

11 Monate vor

Gelöst


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

11 Monate vor

Gelöst


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

11 Monate vor

Gelöst


Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]

11 Monate vor

Gelöst


Ratio between sums of prime and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

11 Monate vor

Gelöst


Vector creation using colon operator
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use the colon (:) operator.

11 Monate vor

Gelöst


Count integers in randomized vector that are multiples of a given number.
The mod() function We might all remember the days when we were taught to divide and then set the remainder aside if the numbers...

11 Monate vor

Gelöst


Return part of an array
Given a 5x5 array, return a 3x3 array that contains the cells that are not on the edge of the array: Given this array Return...

11 Monate vor

Gelöst


Summing the last column column
Given a matrix, return the sum of the last column of the array.

11 Monate vor

Gelöst


The twelve days of Christmas
Traditionally there are twelve days of Christmas to celebrate ("Twelvetide"), typically starting with Christmas Day (25 December...

11 Monate vor

Gelöst


How many days?!?
Christmas is coming earlier and earlier each year. Thanks to rampant commercialism and Christmas Creep, "The Twelve Days of Chr...

11 Monate vor

Gelöst


Calculate the Damerau-Levenshtein distance between two strings.
<http://www.mathworks.co.uk/matlabcentral/cody/problems/2303-compute-hamming-distances-between-each-pair-of-rows-from-two-input-...

11 Monate vor

Gelöst


longest common substring : Skipped character version
Two strings are given. Find the longest common substring between them. The substring characters need not be adjacent. They, howe...

11 Monate vor

Gelöst


Path calculation with polynomials
Let a vector x be the input to our function. 1. If a value of an input vector element x is lower than 0, set this value to 0....

11 Monate vor

Mehr laden